Browse code

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>

Michael Niedermayer authored on 2015/03/07 22:30:34
Showing 1 changed files
... ...
@@ -248,7 +248,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
248 248
     case AV_PIX_FMT_YUV411P:
249 249
     case AV_PIX_FMT_UYYVYY411:
250 250
         w_align = 32;
251
-        h_align = 8;
251
+        h_align = 16 * 2;
252 252
         break;
253 253
     case AV_PIX_FMT_YUV410P:
254 254
         if (s->codec_id == AV_CODEC_ID_SVQ1) {