Navigation Menu

Skip to content

Commit

Permalink
check buffer index is within range before using it (thanks to David B…
Browse files Browse the repository at this point in the history
…inderman)
  • Loading branch information
Lawrence D'Oliveiro committed Feb 19, 2014
1 parent 0a67724 commit 707d186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mpeg2desc.c
Expand Up @@ -673,7 +673,7 @@ static void process_packets
else
{
hdroffs = 0;
while (buf[hdroffs] == 0xff && hdroffs < sizeof(buf))
while (hdroffs < sizeof(buf) && buf[hdroffs] == 0xff)
hdroffs++;
if ((buf[hdroffs] & 0xC0) == 0x40)
{
Expand Down

0 comments on commit 707d186

Please sign in to comment.