---

** [tickets:#2315] amfnd: invalid read in compdb.cc**

**Status:** unassigned
**Milestone:** 5.0.2
**Created:** Tue Feb 21, 2017 07:33 AM UTC by Gary Lee
**Last Updated:** Tue Feb 21, 2017 07:33 AM UTC
**Owner:** nobody


==500== Thread 1:
==500== Invalid read of size 8
==500==    at 0x1939DD: avnd_comptype_delete(amf_comp_type*) (compdb.cc:751)
==500==    by 0x196534: avnd_comptype_create(unsigned long long, std::string 
const&) (compdb.cc:948)
==500==    by 0x197E6B: comp_init(avnd_comp_tag*, SaImmAttrValuesT_2 const**) 
(compdb.cc:1226)
==500==    by 0x1995BC: avnd_comp_create(std::string const&, SaImmAttrValuesT_2 
const**, avnd_su_tag*) (compdb.cc:1422)
==500==    by 0x19A347: avnd_comp_config_get_su(avnd_su_tag*) (compdb.cc:1558)
==500==    by 0x1DF9B6: avnd_evt_avd_reg_su_evh(avnd_cb_tag*, avnd_evt_tag*) 
(su.cc:161)
==500==    by 0x1C0DBC: avnd_evt_process(avnd_evt_tag*) (main.cc:667)
==500==    by 0x1C098E: avnd_main_process() (main.cc:618)
==500==    by 0x1BE7DD: main (main.cc:206)
==500==  Address 0x0 is not stack'd, malloc'd or (recently) free'd


Possible fix:

'''
diff --git a/src/amf/amfnd/compdb.cc b/src/amf/amfnd/compdb.cc
--- a/src/amf/amfnd/compdb.cc
+++ b/src/amf/amfnd/compdb.cc
@@ -852,6 +852,7 @@ static amf_comp_type_t *avnd_comptype_cr
                compt->saAmfCtDefInstantiateCmdArgv[i] = StrDup(str);
                osafassert(compt->saAmfCtDefInstantiateCmdArgv[i]);
        }
+       compt->saAmfCtDefInstantiateCmdArgv[i] = nullptr;
 
        if 
(immutil_getAttr(const_cast<SaImmAttrNameT>("saAmfCtDefInstantiationLevel"), 
attributes, 0, &compt->saAmfCtDefInstantiationLevel) != SA_AIS_OK)
                compt->saAmfCtDefInstantiationLevel = 0;
'''



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to