]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Coverity detected buffer access error
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 19 Mar 2009 13:52:49 +0000 (02:52 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 19 Mar 2009 13:52:49 +0000 (02:52 +1300)
Defined values for SNMP error use decimal values 0-9, 17-24 not 0-19.
Thus the static list of message mappings is out by 6.

snmplib/snmp_error.c

index 3fc747fce374e485e84c88c5036d378be2bc64d7..d2edea084b17bbc61ccd87e7671a044e4be8f9d5 100644 (file)
@@ -46,6 +46,14 @@ static const char *error_string[19] = {
     "WRONGTYPE",
     "WRONGLENGTH",
     "WRONGENCODING",
+
+/* 0xA */"UNDEFINED",
+/* 0xb */"UNDEFINED",
+/* 0xC */"UNDEFINED",
+/* 0xD */"UNDEFINED",
+/* 0xE */"UNDEFINED",
+/* 0xF */"UNDEFINED",
+
     "WRONGVALUE",
     "NOCREATION",
     "INCONSISTENTVALUE",