Date: Sun, 10 Aug 2014 19:07:56 GMT From: shonali@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r272180 - soc2014/shonali/head/usr.sbin/bsnmpd/tools/libbsnmptools Message-ID: <201408101907.s7AJ7uLD007960@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: shonali Date: Sun Aug 10 19:07:55 2014 New Revision: 272180 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272180 Log: Code corrections in bsnmptools.c Modified: soc2014/shonali/head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Modified: soc2014/shonali/head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- soc2014/shonali/head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Sun Aug 10 19:01:03 2014 (r272179) +++ soc2014/shonali/head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Sun Aug 10 19:07:55 2014 (r272180) @@ -1971,7 +1971,7 @@ case SNMP_SYNTAX_IPADDRESS: if (temp.len < 4) return (-1); - ip = malloc(sizeof(u_int8_t)*SNMP_IPv4_ADDR_SIZ); + ip = malloc(sizeof(u_int8_t)*4); for (bytes = 0; bytes < 4; bytes++) ip[bytes] = temp.subs[bytes]; snmp_output_ipaddress(snmptoolctx, ip); @@ -1981,7 +1981,7 @@ case SNMP_SYNTAX_IP6ADDRESS: if (temp.len < 16) return (-1); - ip = malloc(sizeof(u_int8_t)*SNMP_IPv6_ADDR_SIZ); + ip = malloc(sizeof(u_int8_t)*16); for (bytes = 0; bytes < 16; bytes++) ip[bytes] = temp.subs[bytes]; snmp_output_ip6address(snmptoolctx, ip);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408101907.s7AJ7uLD007960>