diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-02-05 20:55:38 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-02-05 20:55:38 +0000 |
commit | faabfb8aff4b93bf24848c4f81090b9ba682f3ec (patch) | |
tree | befb41a7352c7b197dc6d7b0c5e59e8948ba473f /usr.bin/rpcgen | |
parent | c3b91598a55591f0db723d9ecb78446ee7c5348e (diff) | |
download | src-test2-faabfb8aff4b93bf24848c4f81090b9ba682f3ec.tar.gz src-test2-faabfb8aff4b93bf24848c4f81090b9ba682f3ec.zip |
Notes
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r-- | usr.bin/rpcgen/rpc_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index c9b2e7af8330..75ed6e5b88f2 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -1125,9 +1125,11 @@ parseargs(int argc, const char *argv[], struct commandline *cmd) 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); } |