From: Tymoteusz Blazejczyk Date: Wed, 12 Jun 2019 14:01:05 +0000 (+0200) Subject: Fixed number of elements returned X-Git-Tag: libpcap-1.10-bp~483^2 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/b0e790519df4ec8204c843987fdfa4aa18e2a3cd Fixed number of elements returned --- diff --git a/savefile.c b/savefile.c index e6404e74..9e4724b2 100644 --- a/savefile.c +++ b/savefile.c @@ -360,7 +360,7 @@ pcap_fopen_offline_with_tstamp_precision(FILE *fp, u_int precision, * numbers that are unique in their first 4 bytes. */ amt_read = fread(&magic, sizeof(magic), 1, fp); - if (amt_read != sizeof(magic)) { + if (amt_read != 1) { if (ferror(fp)) { pcap_fmt_errmsg_for_errno(errbuf, PCAP_ERRBUF_SIZE, errno, "error reading dump file");