ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sat Apr 1 19:18:35 2017 +0200| [23ae3cc822915ede2bb4e85047ab46cc5bc71268] | committer: Michael Niedermayer
avformat/oggparsedaala: Do not leave an invalid value in gpshift Fixes: undefined behavior Fixes: 702974 Found-by: Thomas Guilbert <[email protected]> Reviewed-by: Rostislav Pehlivanov <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23ae3cc822915ede2bb4e85047ab46cc5bc71268 --- libavformat/oggparsedaala.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/oggparsedaala.c b/libavformat/oggparsedaala.c index ce65b2b..a373b41 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; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
