h264: reject mismatching luma/chroma bit depths during sps parsing
authorAnton Khirnov <anton@khirnov.net>
Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)
committerSean McGovern <gseanmcg@gmail.com>
Mon, 14 Apr 2014 20:55:38 +0000 (16:55 -0400)
commit7f604a048e9b6128cdf9ce7e95f21d1a9822ba39
tree123726105b61d6bf9d535ce860c89faca18c756e
parent7e513d85e80d730718695d09fcaf0295ae24699e
h264: reject mismatching luma/chroma bit depths during sps parsing

There is no point in delaying the check and it avoids bugs with a
half-initialized context.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
libavcodec/h264.c
libavcodec/h264_ps.c