forked from osmocom/wireshark
From Rolf Fiedler:
patch to fix mp2t.c to reject more byte streams that are not MPEG2. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7132 svn path=/trunk/; revision=42127
This commit is contained in:
parent
7422d0ad08
commit
ec0c5baf4f
|
@ -179,9 +179,10 @@ mp2t_open(wtap *wth, int *err, gchar **err_info)
|
|||
bytes_read = file_read(buffer, MP2T_SIZE+trailer_len, wth->fh);
|
||||
if (bytes_read < 0)
|
||||
return -1; /* read error */
|
||||
if (bytes_read < MP2T_SIZE+trailer_len)
|
||||
if (bytes_read < MP2T_SIZE+trailer_len) {
|
||||
if(sync_steps<2) return 0; /* wrong file type - not an mpeg2 ts file */
|
||||
break; /* end of file, that's ok if we're still in sync */
|
||||
|
||||
}
|
||||
if (buffer[0] == MP2T_SYNC_BYTE) {
|
||||
sync_steps++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue