From: Andriy Gelman <[email protected]>
Signed-off-by: Andriy Gelman <[email protected]>
---
libavcodec/hevc_mp4toannexb_bsf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/hevc_mp4toannexb_bsf.c
b/libavcodec/hevc_mp4toannexb_bsf.c
index 36fd6f0b15c..49daf4a616c 100644
--- a/libavcodec/hevc_mp4toannexb_bsf.c
+++ b/libavcodec/hevc_mp4toannexb_bsf.c
@@ -152,8 +152,7 @@ static int hevc_mp4toannexb_filter(AVBSFContext *ctx,
AVPacket *out)
extra_size = add_extradata * ctx->par_out->extradata_size;
got_irap |= is_irap;
- if (INT_MAX < 4 + nalu_size ||
- INT_MAX - 4 < extra_size + nalu_size) {
+ if (INT_MAX < 4 + nalu_size + extra_size) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
--
2.24.0
_______________________________________________
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".