Author: dim Date: Sun Feb 5 20:55:38 2012 New Revision: 231054 URL: http://svn.freebsd.org/changeset/base/231054
Log: In usr.bin/rpcgen/rpc_main.c, properly check the return value of strlcpy(), in addition to checking that of strlcat(). MFC after: 1 week Modified: head/usr.bin/rpcgen/rpc_main.c Modified: head/usr.bin/rpcgen/rpc_main.c ============================================================================== --- head/usr.bin/rpcgen/rpc_main.c Sun Feb 5 20:53:06 2012 (r231053) +++ head/usr.bin/rpcgen/rpc_main.c Sun Feb 5 20:55:38 2012 (r231054) @@ -1125,9 +1125,11 @@ parseargs(int argc, const char *argv[], if (++i == argc) { return (0); } - (void) strlcpy(pathbuf, argv[i], sizeof(pathbuf)); - if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) - >= sizeof(pathbuf)) { + if (strlcpy(pathbuf, argv[i], + sizeof(pathbuf)) >= sizeof(pathbuf) + || strlcat(pathbuf, "/cpp", + sizeof(pathbuf)) >= + sizeof(pathbuf)) { warnx("argument too long"); return (0); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"