mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
h264: check that luma and chroma depth match
Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
59015c1118
commit
bdeb61ccc6
@ -380,7 +380,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||||||
}
|
}
|
||||||
sps->bit_depth_luma = get_ue_golomb(&h->gb) + 8;
|
sps->bit_depth_luma = get_ue_golomb(&h->gb) + 8;
|
||||||
sps->bit_depth_chroma = get_ue_golomb(&h->gb) + 8;
|
sps->bit_depth_chroma = get_ue_golomb(&h->gb) + 8;
|
||||||
if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U) {
|
if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U || sps->bit_depth_luma != sps->bit_depth_chroma) {
|
||||||
av_log(h->avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n",
|
av_log(h->avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n",
|
||||||
sps->bit_depth_luma, sps->bit_depth_chroma);
|
sps->bit_depth_luma, sps->bit_depth_chroma);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user