Fixes: CID1594529 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/libx264.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 2715f277f1f..e4938c54a90 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -922,7 +922,9 @@ static int set_avcc_extradata(AVCodecContext *avctx,
x264_nal_t *nal, int nnal)
*
* +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
get_ue_golomb_31(&gbc);
chroma_format_idc = get_ue_golomb_31(&gbc);
--
2.43.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".