Commit 38b6dffb authored by conrad's avatar conrad

Fix packetno check for holes in headers.

The packetno has not yet been incremented, so the value to
check is off-by-one
parent ae7739dd
......@@ -360,8 +360,10 @@ oggz_read_sync (OGGZ * oggz)
#ifdef DEBUG
printf ("oggz_read_sync: hole in the data\n");
#endif
/* We can't tolerate holes in headers, so bail out. */
if (stream->packetno < 3) return OGGZ_ERR_HOLE_IN_DATA;
/* We can't tolerate holes in headers, so bail out. NB. as stream->packetno
* has not yet been incremented, the current value refers to how many packets
* have been processed prior to this one. */
if (stream->packetno < 2) return OGGZ_ERR_HOLE_IN_DATA;
/* Holes in content occur in some files and pretty much don't matter,
* so we silently swallow the notification and reget the packet.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment