diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-01 19:18:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-01 22:09:23 +0200 |
commit | 23ae3cc822915ede2bb4e85047ab46cc5bc71268 (patch) | |
tree | a3d3b4c2bf0e1ffb33b3aebed5641585090285e4 | |
parent | 679a315424e6ffaafd21ebf7a86108bd4e743793 (diff) | |
download | ffmpeg-23ae3cc822915ede2bb4e85047ab46cc5bc71268.tar.gz |
avformat/oggparsedaala: Do not leave an invalid value in gpshift
Fixes: undefined behavior
Fixes: 702974
Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/oggparsedaala.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/oggparsedaala.c b/libavformat/oggparsedaala.c index ce65b2bd7a..a373b41b4c 100644 --- a/libavformat/oggparsedaala.c +++ b/libavformat/oggparsedaala.c @@ -126,6 +126,7 @@ static int daala_header(AVFormatContext *s, int idx) if (hdr->gpshift >= 32) { av_log(s, AV_LOG_ERROR, "Too large gpshift %d (>= 32).\n", hdr->gpshift); + hdr->gpshift = 0; return AVERROR_INVALIDDATA; } hdr->gpmask = (1U << hdr->gpshift) - 1; |