]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.c
nuke strcpy, one more.
[libpcap] / gencode.c
index 33c71f6386fa14777d2420f0d15174f68096c22f..4dcdbaa6702f9df57d18f591acd3aef19c9c9e52 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.108 2000-04-27 11:16:19 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.109 2000-04-27 11:16:54 itojun Exp $ (LBL)";
 #endif
 
 #include <sys/types.h>
@@ -226,7 +226,7 @@ sdup(s)
        int n = strlen(s) + 1;
        char *cp = newchunk(n);
 
-       strcpy(cp, s);  /*safe*/
+       strlcpy(cp, s, n);
        return (cp);
 }