mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-23 15:53:08 +00:00
oggparsevorbis: fix null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b02cc2ddc6
commit
18b46a494e
@ -203,12 +203,12 @@ vorbis_header (AVFormatContext * s, int idx)
|
|||||||
int pkt_type = os->buf[os->pstart];
|
int pkt_type = os->buf[os->pstart];
|
||||||
|
|
||||||
if (!(pkt_type & 1))
|
if (!(pkt_type & 1))
|
||||||
return 0;
|
return os->private ? 0 : -1;
|
||||||
|
|
||||||
if (!os->private) {
|
if (!os->private) {
|
||||||
os->private = av_mallocz(sizeof(struct oggvorbis_private));
|
os->private = av_mallocz(sizeof(struct oggvorbis_private));
|
||||||
if (!os->private)
|
if (!os->private)
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os->psize < 1 || pkt_type > 5)
|
if (os->psize < 1 || pkt_type > 5)
|
||||||
|
Loading…
Reference in New Issue
Block a user