Browse Source

avformat/oggparseogm: Check lb against psize

No testcase, this was found during code review

Found-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e7c847aaf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.7
Michael Niedermayer 7 years ago
parent
commit
e61cdbe271
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/oggparseogm.c

+ 3
- 0
libavformat/oggparseogm.c View File

@@ -177,6 +177,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;



Loading…
Cancel
Save