svn commit: r220142 - projects/sv/sys/netinet
Attilio Rao
attilio at FreeBSD.org
Tue Mar 29 18:07:19 UTC 2011
Author: attilio
Date: Tue Mar 29 18:07:19 2011
New Revision: 220142
URL: http://svn.freebsd.org/changeset/base/220142
Log:
Fix a bug where the passed lenght is lesser than the required one for
strlcpy.
Modified:
projects/sv/sys/netinet/netdump_client.c
Modified: projects/sv/sys/netinet/netdump_client.c
==============================================================================
--- projects/sv/sys/netinet/netdump_client.c Tue Mar 29 17:59:30 2011 (r220141)
+++ projects/sv/sys/netinet/netdump_client.c Tue Mar 29 18:07:19 2011 (r220142)
@@ -202,7 +202,7 @@ sysctl_handle_ifxname(SYSCTL_HANDLER_ARG
IFNET_RUNLOCK_NOSLEEP();
if (found == 0)
return (EINVAL);
- strlcpy(arg1, buf, strlen(buf));
+ strlcpy(arg1, buf, strlen(buf) + 1);
return (error);
}
More information about the svn-src-projects
mailing list