]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fixed number of elements returned 825/head
authorTymoteusz Blazejczyk <[email protected]>
Wed, 12 Jun 2019 14:01:05 +0000 (16:01 +0200)
committerTymoteusz Blazejczyk <[email protected]>
Wed, 12 Jun 2019 14:01:05 +0000 (16:01 +0200)
savefile.c

index e6404e74a9b49d785891d755636d9672a7f90a0f..9e4724b23fb81a22aec30dcae8e1fdafe467a00c 100644 (file)
@@ -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");