Commit 3e7c847a authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggparseogm: Check lb against psize

No testcase, this was found during code review
Found-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Reviewed-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 010b7b30
......@@ -176,6 +176,9 @@ ogm_packet(AVFormatContext *s, int idx)
os->pflags |= AV_PKT_FLAG_KEY;
lb = ((*p & 2) << 1) | ((*p >> 6) & 3);
if (os->psize < lb + 1)
return AVERROR_INVALIDDATA;
os->pstart += lb + 1;
os->psize -= lb + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment