mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
mpc8: check stream count before accessing stream 1.
Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ee9151b616
commit
69fb605ad5
@ -139,6 +139,11 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
|
||||
int i, t, seekd;
|
||||
GetBitContext gb;
|
||||
|
||||
if (s->nb_streams<=0) {
|
||||
av_log(s, AV_LOG_ERROR, "cannot parse stream table before stream header\n");
|
||||
return;
|
||||
}
|
||||
|
||||
avio_seek(s->pb, off, SEEK_SET);
|
||||
mpc8_get_chunk_header(s->pb, &tag, &size);
|
||||
if(tag != TAG_SEEKTABLE){
|
||||
|
Loading…
Reference in New Issue
Block a user