diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-07 14:30:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-13 17:06:09 +0100 |
commit | 95d6bd95b1296128b2750151924790b148cb20c8 (patch) | |
tree | a96a773406a4abaaa92b2ba7069893cb0670d156 | |
parent | c80c0b2637d83a4066cec38f2d2c00c0cff2a1ff (diff) | |
download | ffmpeg-95d6bd95b1296128b2750151924790b148cb20c8.tar.gz |
avcodec/utils: Align YUV411 by as much as the other YUV variants
Fixes out of array accesses
Fixes: ffmpeg_mjpeg_crash2.avi
Found-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Tested-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e3201c38d53d2b8b24d0bc95d726b2cb1752dc12)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6bae2a8e71..0d823955ff 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -248,7 +248,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, case AV_PIX_FMT_YUV411P: case AV_PIX_FMT_UYYVYY411: w_align = 32; - h_align = 8; + h_align = 16 * 2; break; case AV_PIX_FMT_YUV410P: if (s->codec_id == AV_CODEC_ID_SVQ1) { |