svn commit: r300276 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools
Don Lewis
truckman at FreeBSD.org
Fri May 20 06:47:43 UTC 2016
Author: truckman
Date: Fri May 20 06:47:42 2016
New Revision: 300276
URL: https://svnweb.freebsd.org/changeset/base/300276
Log:
MFC r299593
Properly compute the size argument to pass to malloc().
Reported by: Coverity
CID: 1198856
Modified:
stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==============================================================================
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri May 20 06:43:55 2016 (r300275)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri May 20 06:47:42 2016 (r300276)
@@ -798,7 +798,7 @@ parse_server(char *opt_arg)
return (-1);
if (snmp_client.trans > SNMP_TRANS_UDP && snmp_client.chost == NULL) {
- if ((snmp_client.chost = malloc(strlen(SNMP_DEFAULT_LOCAL + 1)))
+ if ((snmp_client.chost = malloc(strlen(SNMP_DEFAULT_LOCAL) + 1))
== NULL) {
syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
return (-1);
More information about the svn-src-stable
mailing list