[FFmpeg-cvslog] avformat/apngdec: Use 64bit for ret to avoid overflow

Michael Niedermayer git at videolan.org
Sat Mar 21 02:30:01 CET 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 20 20:38:14 2015 +0100| [4ef32aa2a69c13c326d1926a6aced3cb11e742f5] | committer: Michael Niedermayer

avformat/apngdec: Use 64bit for ret to avoid overflow

Missed this hunk in first commit

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 80a851aa5ef2c848449f741365968c8f0ccf4531)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ef32aa2a69c13c326d1926a6aced3cb11e742f5
---

 libavformat/apngdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index a0a475a..6deff3b 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -150,7 +150,8 @@ static int apng_read_header(AVFormatContext *s)
     AVIOContext *pb = s->pb;
     uint32_t len, tag;
     AVStream *st;
-    int ret = AVERROR_INVALIDDATA, acTL_found = 0;
+    int acTL_found = 0;
+    int64_t ret = AVERROR_INVALIDDATA;
 
     /* verify PNGSIG */
     if (avio_rb64(pb) != PNGSIG)



More information about the ffmpeg-cvslog mailing list