summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--savefile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/savefile.c b/savefile.c
index c0f1acb5..19c4675e 100644
--- a/savefile.c
+++ b/savefile.c
@@ -276,6 +276,11 @@ pcap_open_offline_with_tstamp_precision(const char *fname, u_int precision,
FILE *fp;
pcap_t *p;
+ if (fname == NULL) {
+ pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "A null pointer was supplied as the file name");
+ return (NULL);
+ }
if (fname[0] == '-' && fname[1] == '\0')
{
fp = stdin;