We would like to use AGENT++ in one of our products, but as it is currently it seems like there are many
nullptrs passed around at multiple places, resulting in segfaults, even with the examples.
This can be reproduced on Ubuntu 20.04 with SNMP++/AGENT++ installed into a prefix in
/opt, using the iReasoning MibBrowser.
Agentpp::Counter32MibLeaf::get_instance()(mib.cpp:407) gets passed
mib=0x0when a request comes in, without there being a check whether mib is actually valid or not.
- Same with
- And with
I tried to fix these accesses to invalid pointers by returning the respective
instances when mib is 0x0.
After that the static_table example can be successfully walked through in MibBrowser, but in our multithreaded application this results in the
RequestLists returning a nullptr when receiving a request, due to being unable to find a valid
snmpCommunityEntry in request.cpp:1345.