]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap.c
do not use sprintf(). always use snprintf().
[libpcap] / pcap.c
diff --git a/pcap.c b/pcap.c
index 0f1848ebc732f4e6cec6d9f892b81bb35ac49f75..808e4dbd9ccb0a0718056784e541bf1cc4594010 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.29 1999-10-07 23:46:40 mcr Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.30 2000-04-27 09:11:14 itojun Exp $ (LBL)";
 #endif
 
 #include <sys/types.h>
@@ -180,7 +180,7 @@ pcap_strerror(int errnum)
 
        if ((unsigned int)errnum < sys_nerr)
                return ((char *)sys_errlist[errnum]);
-       (void)sprintf(ebuf, "Unknown error: %d", errnum);
+       (void)snprintf(ebuf, sizeof ebuf, "Unknown error: %d", errnum);
        return(ebuf);
 #endif
 }