summaryrefslogtreecommitdiff
path: root/print-sunrpc.c
diff options
context:
space:
mode:
authoritojun <itojun>2000-01-17 06:24:23 +0000
committeritojun <itojun>2000-01-17 06:24:23 +0000
commitdff10c7f70d539c431a1eba9ab5e076d8b0f5c8e (patch)
tree29fbd05a7fa3afbeba9b422f86f9995c166d2eaa /print-sunrpc.c
parent92d3fd1b47a8c041297a3dfa655f0d548012f61c (diff)
downloadtcpdump-dff10c7f70d539c431a1eba9ab5e076d8b0f5c8e.tar.gz
s/sprintf/snprintf/.
there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
Diffstat (limited to 'print-sunrpc.c')
-rw-r--r--print-sunrpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-sunrpc.c b/print-sunrpc.c
index bc4dc5c5..529bf36a 100644
--- a/print-sunrpc.c
+++ b/print-sunrpc.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.29 1999-11-21 09:37:02 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.30 2000-01-17 06:24:26 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -129,7 +129,7 @@ progstr(prog)
return (buf);
rp = getrpcbynumber(prog);
if (rp == NULL)
- (void) sprintf(buf, "#%u", prog);
+ (void) snprintf(buf, sizeof(buf), "#%u", prog);
else
strcpy(buf, rp->r_name);
return (buf);