History

avcodec/libx264: Check init_get_bits8() return code

Fixes: CID1594529 Unchecked return value

Michael Niedermayer committed 2 years ago

Commit dce69ba1 parent 8a64a001 file · +3 −1Browse files

Unified · Split

libavcodec/libx264.c+3−1
@@ -922,7 +922,9 @@ static int set_avcc_extradata(AVCodecContext *avctx, x264_nal_t *nal, int nnal) · 921 unmodified lines
922922 *
923923 * +4 to skip until sps id.
924924 */
925− init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4);
925+ ret = init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4);
926+ if (ret < 0)
927+ return ret;
926928 // Skip sps id
927929 get_ue_golomb_31(&gbc);
928930 chroma_format_idc = get_ue_golomb_31(&gbc);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t