By sheer chance, I found a bug in read_config. I was checking to see what
files an agent was reading, and saw lots of 'directory not present' messages
logged for weird name (some including control characters). A short debugging
session later, I found that if the last directory in the config list does not
exist, the code will continue looking for directories past the end of the
buffer. This patch adds an extra condition to the while check, instead of
relying on a break inside the loop.
Index: snmplib/read_config.c
===================================================================
--- snmplib/read_config.c (revision 16585)
+++ snmplib/read_config.c (working copy)
@@ -1050,7 +1050,7 @@
ctmp->fileHeader, envconfpath, perspath));
cptr1 = cptr2 = envconfpath;
done = 0;
- while (*cptr2 != 0) {
+ while ((*cptr2 != 0) && (!done)) {
while (*cptr1 != 0 && *cptr1 != ENV_SEPARATOR_CHAR)
cptr1++;
if (*cptr1 == 0)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders