avoid overrun at end of file

This commit is contained in:
hummypkg 2011-09-01 14:39:56 +00:00 committed by HummyPkg
parent c156fc493f
commit 372759652d
1 changed files with 2 additions and 1 deletions

3
epg.c
View File

@ -344,7 +344,8 @@ parse(char *epgpath,
epg->offset += 4;
/* Skip padding bytes... */
while (epg->bin[epg->offset] == 'U')
while (epg->offset < epg->binsize &&
epg->bin[epg->offset] == 'U')
epg->offset++;
}