png_parser: fix size of chunk_lenght

Message ID 20141111120507.2392D5DC05@aruru.libav.org
State New
Headers show

Commit Message

Janne Grunau Nov. 11, 2014, 12:05 p.m.
Module: libav
Branch: master
Commit: 60b055133485891405722bc9722e2c74fc9764b8

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

png_parser: fix size of chunk_lenght

Fixes the comparison against constant value 0x7fffffff.

CC: libav-stable@libav.org
Bug-Id: CID 1198260

---

 libavcodec/png_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c
index d07f288..c66caf3 100644
--- a/libavcodec/png_parser.c
+++ b/libavcodec/png_parser.c
@@ -36,7 +36,7 @@  typedef struct PNGParseContext {
     ParseContext pc;
 
     int chunk_pos;          ///< position inside current chunk
-    int chunk_length;       ///< length of the current chunk
+    uint32_t chunk_length;  ///< length of the current chunk
     int remaining_size;     ///< remaining size of the current chunk
 } PNGParseContext;