]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
The payload of an SCTP DATA chunk is *not* necessarily ASCII text, so it
[tcpdump] / tcpdump.c
index d310eb98c0008a80ece3ac82868ea695fe437409..db1237dde8d457c3a3648a4f0dc309ca6fdad888 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.171 2001-10-27 08:23:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.172 2001-11-15 08:03:41 itojun Exp $ (LBL)";
 #endif
 
 /*
@@ -567,6 +567,8 @@ dump_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
         */
        if (ftell((FILE *)info->p) > Cflag) {
                name = (char *) malloc(strlen(info->WFileName) + 4);
+               if (name == NULL)
+                       error("dump_and_trunc: malloc");
                strcpy(name, info->WFileName);
                swebitoa(cnt, name + strlen(info->WFileName));
                cnt++;