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)
committerReinhard Tartler <siretart@tauware.de>
Sun, 1 Jun 2014 00:05:19 +0000 (20:05 -0400)
commitc4033cd4eb921a9cc8deb513efc6d6a6ba3b2163
tree640d0677cebba1d6ca44239b9d2e0ad746a97b93
parent7f33a24e824c6d20cb941e6b20c5382becfbc923
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