X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/42ab2e753f85fff7f8c974c2f8c93716fa101897..872b0c20b378746e8085ce9e6f3e09e628819593:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index f21ec355..41f952f2 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -589,6 +589,8 @@ static void MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars) { char *filename = malloc(NAME_MAX + 1); + if (filename == NULL) /* didn't get memory requested */ + error("malloc of filename:"); /* Process with strftime if Gflag is set. */ if (Gflag != 0) {