diff --git wiretap/packetlogger.c wiretap/packetlogger.c index 6907009..021ed12 100644 --- wiretap/packetlogger.c +++ wiretap/packetlogger.c @@ -67,7 +67,9 @@ int packetlogger_open(wtap *wth, int *err, gchar **err_info _U_) if(!packetlogger_read_header(&pl_hdr, wth->fh, err)) return -1; - file_read(&type, 1, 1, wth->fh); + + if (file_read(&type, 1, 1, wth->fh) <= 0) + return -1; /* Verify this file belongs to us */ if (!((8 <= pl_hdr.len) && (pl_hdr.len < 65536) && diff --git wiretap/vms.c wiretap/vms.c index 2259948..d24d131 100644 --- wiretap/vms.c +++ wiretap/vms.c @@ -489,7 +489,8 @@ parse_vms_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err, } /* Avoid TCPIPTRACE-W-BUFFERSFUL, TCPIPtrace could not save n packets. * errors. */ - file_gets(line, VMS_LINE_LENGTH, fh); + if (!file_gets(line, VMS_LINE_LENGTH, fh)) + return FALSE; return TRUE; }