aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-07 14:30:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-12 18:03:50 +0100
commit7f99fae1ec2903366ecc529d84d2542daa5f3c57 (patch)
tree3fc3c6af8bc48c34af7330c508ae5c1b3eac0cd2 /libavcodec
parent6739df26a62049ae579fa2a31c2552315eb640da (diff)
downloadffmpeg-7f99fae1ec2903366ecc529d84d2542daa5f3c57.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) Conflicts: libavcodec/utils.c
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7cfb96d537..a35da92106 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -202,8 +202,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
break;
case PIX_FMT_YUV411P:
case PIX_FMT_UYYVYY411:
- w_align=32;
- h_align=8;
+ w_align = 32;
+ h_align = 16 * 2;
break;
case PIX_FMT_YUV410P:
if(s->codec_id == CODEC_ID_SVQ1){