[libav-commits] 4xm: drop unnecessary check

Vittorio Giovara git at libav.org
Tue Nov 11 13:04:50 CET 2014


Module: libav
Branch: master
Commit: 0e1ebfebc8326069732795698a82f3fea0742a54

Author:    Vittorio Giovara <vittorio.giovara at gmail.com>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Sun Nov  9 08:48:40 2014 +0100

4xm: drop unnecessary check

data_size is always >= 0 in this case.

CC: libav-stable at libav.org
Bug-Id: CID 1238788

---

 libavcodec/4xm.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 36d9dc1..2cecd4d 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -820,9 +820,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
         const int data_size  = buf_size - 20;
         CFrameBuffer *cfrm;
 
-        if (data_size < 0)
-            return AVERROR_INVALIDDATA;
-
         id         = AV_RL32(buf + 12);
         whole_size = AV_RL32(buf + 16);
 



More information about the libav-commits mailing list