This is a discussion on buffer too small in function parse_capabilities() in file parse.c within the SNMP Coders forums, part of the Networking and Network Related category; Hi all! in function parse_capabilities() in file parse.c, line 3212: type = get_token(fp, token, MAXTOKEN); if (type != QUOTESTRING) { print_error(&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all!
in function parse_capabilities() in file parse.c, line 3212: type = get_token(fp, token, MAXTOKEN); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", token, type); goto skip; } if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) { np->description = strdup(token); } I think it is better the variable "token" to change to char quoted_string_buffer[MAXQUOTESTR]; I mean: type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); if (type != QUOTESTRING) { print_error("Bad DESCRIPTION", token, type); goto skip; } if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) { np->description = strdup(quoted_string_buffer); } Is this have sense ? Aleksandr Lomanov ICQ#: 170411676 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |