diff options
author | Michael Niedermayer <[email protected]> | 2018-03-09 01:05:20 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2018-07-08 19:45:45 +0200 |
commit | 723f154ae09aa04042398a31b14ed6c721578959 (patch) | |
tree | 22d660ee3b5720f3b7f912dbbd9a0ccf59559e30 | |
parent | bdb68741ba221bd73f924bdacadccfcc1180f2fc (diff) |
avformat/oggparseogm: Check lb against psize
No testcase, this was found during code review
Found-by: Matt Wolenetz <[email protected]>
Reviewed-by: Matt Wolenetz <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 3e7c847aaf5a298b62afae12b4ecfb8e12385998)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavformat/oggparseogm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index 4d09d174b8..03499486f7 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -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; |