mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/libx264: Check init_get_bits8() return code
Fixes: CID1594529 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit dce69ba89e37a956236b30663be893b7dae1567b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
caed56c6c5
commit
ca087aac86
@ -929,7 +929,9 @@ static int set_avcc_extradata(AVCodecContext *avctx, x264_nal_t *nal, int nnal)
|
|||||||
*
|
*
|
||||||
* +4 to skip until sps id.
|
* +4 to skip until sps id.
|
||||||
*/
|
*/
|
||||||
init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4);
|
ret = init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
// Skip sps id
|
// Skip sps id
|
||||||
get_ue_golomb_31(&gbc);
|
get_ue_golomb_31(&gbc);
|
||||||
chroma_format_idc = get_ue_golomb_31(&gbc);
|
chroma_format_idc = get_ue_golomb_31(&gbc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user