Hello,

As requested in the sujbect, what's the purpose of line 2824 in mib.c file?

tmpbuf2[strlen(tmpbuf2)-1] = 0;

It causes my "/mibs" directory to be trimmed to "/mib" and nothing works.

Other static buffers are zero-terminated by using sizeof()hence preventing some 
potential trouble but this uses strlen(), so a char gets trimmed! It only works 
if I specify my directory as /mibs/ so that the suppressed char is the /

Is this a typo? Strlen instead of str

Also, I had to memset to 0 all the buffers for peace of mind because I'm 
porting netsnmp to an embedded plaform that doesn't automatically set to zero 
static variables and arrays on declaration.

Thank you for your insight

Moreno Floris
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to