jpeg2000: Make nreslevel fields int
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 5 Jun 2013 16:11:57 +0000 (18:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 5 Jun 2013 16:34:07 +0000 (18:34 +0200)
This prevents potential integer overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000.h

index e9d01ac..2ef2923 100644 (file)
@@ -128,8 +128,8 @@ typedef struct Jpeg2000TgtNode {
 } Jpeg2000TgtNode;
 
 typedef struct Jpeg2000CodingStyle {
-    uint8_t nreslevels;       // number of resolution levels
-    uint8_t nreslevels2decode; // number of resolution levels to decode
+    int nreslevels;           // number of resolution levels
+    int nreslevels2decode;    // number of resolution levels to decode
     uint8_t log2_cblk_width,
             log2_cblk_height; // exponent of codeblock size
     uint8_t transform;        // DWT type