[FFmpeg-devel] [PATCH] avformat/fitsdec: remove always true condition

Steven Liu liuqi05 at kuaishou.com
Sat Dec 25 16:10:36 EET 2021


From: Steven Liu <lq at chinaffmpeg.org>

Because the AVBPrint->len is unsigned, so it should alway true,
the AVBPrint->len < INT64_MAX is unneccessary condition.

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavformat/fitsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c
index 54412c60ff..6477c5ab1f 100644
--- a/libavformat/fitsdec.c
+++ b/libavformat/fitsdec.c
@@ -174,7 +174,7 @@ static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
         goto fail;
     }
 
-    av_assert0(avbuf.len <= INT64_MAX && size <= INT64_MAX);
+    av_assert0(size <= INT64_MAX);
     if (avbuf.len + size > INT_MAX - 80)  {
         ret = AVERROR_INVALIDDATA;
         goto fail;
-- 
2.29.2



More information about the ffmpeg-devel mailing list