diff options
Diffstat (limited to 'gst-libs/ext/libav/libavformat/omadec.c')
-rw-r--r-- | gst-libs/ext/libav/libavformat/omadec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/ext/libav/libavformat/omadec.c b/gst-libs/ext/libav/libavformat/omadec.c index 8548fb5..0403451 100644 --- a/gst-libs/ext/libav/libavformat/omadec.c +++ b/gst-libs/ext/libav/libavformat/omadec.c @@ -170,7 +170,11 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size, taglen = AV_RB32(&enc_header[pos+32]); datalen = AV_RB32(&enc_header[pos+36]) >> 4; - pos += 44 + taglen; + pos += 44; + if (size - pos < taglen) + return -1; + + pos += taglen; if (datalen << 4 > size - pos) return -1; |