]> The Tcpdump Group git mirrors - tcpdump/commitdiff
use strlcpy (avoid strcpy)
authoritojun <itojun>
Thu, 27 Apr 2000 11:10:59 +0000 (11:10 +0000)
committeritojun <itojun>
Thu, 27 Apr 2000 11:10:59 +0000 (11:10 +0000)
print-sunrpc.c

index 529bf36ab37d5c9124428848ab7e1e34ad49660c..8f1c9195d29f1c1d7b26dbe0d6635f79ca694cc1 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.30 2000-01-17 06:24:26 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.31 2000-04-27 11:10:59 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -131,6 +131,6 @@ progstr(prog)
        if (rp == NULL)
                (void) snprintf(buf, sizeof(buf), "#%u", prog);
        else
-               strcpy(buf, rp->r_name);
+               strlcpy(buf, rp->r_name, sizeof(buf));
        return (buf);
 }