Merge pull request #708 from GrokImageCompression/issue_695
authorAntonin Descampe <antonin@gmail.com>
Mon, 18 Apr 2016 08:51:51 +0000 (10:51 +0200)
committerAntonin Descampe <antonin@gmail.com>
Mon, 18 Apr 2016 08:51:51 +0000 (10:51 +0200)
issue #695 MQ Encode: ensure that bp pointer never points to uninitialized memory

src/bin/jp2/opj_dump.c
src/lib/openjp2/t1_generate_luts.c

index 1e51f43c1c0b8b64c1a0d4faf793b7b4b25333d1..bd608c2b7efa8f7f55a2117f4bc174e9e81117dc 100644 (file)
@@ -433,12 +433,6 @@ int main(int argc, char *argv[])
        img_fol_t img_fol;
        dircnt_t *dirptr = NULL;
 
-#ifdef MSD
-       OPJ_BOOL l_go_on = OPJ_TRUE;
-       OPJ_UINT32 l_max_data_size = 1000;
-       OPJ_BYTE * l_data = (OPJ_BYTE *) malloc(1000);
-#endif
-
        /* Set decoding parameters to default values */
        opj_set_default_decoder_parameters(&parameters);
 
index 1997d39977a42befce3b740bc36a77213cca9d11..cba7245d28f5491b91438bc96336c832f523ac88 100644 (file)
 
 static int t1_init_ctxno_zc(int f, int orient) {
        int h, v, d, n, t, hv;
-       n = 0;
        h = ((f & T1_SIG_W) != 0) + ((f & T1_SIG_E) != 0);
        v = ((f & T1_SIG_N) != 0) + ((f & T1_SIG_S) != 0);
        d = ((f & T1_SIG_NW) != 0) + ((f & T1_SIG_NE) != 0) + ((f & T1_SIG_SE) != 0) + ((f & T1_SIG_SW) != 0);
+       n = 0;
+       t = 0;
+       hv = 0;
 
        switch (orient) {
                case 2: