]> granicus.if.org Git - openjpeg/commitdiff
[trunk] merge r1322 from branch 1.5 over to trunk
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 2 Mar 2012 15:04:45 +0000 (15:04 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 2 Mar 2012 15:04:45 +0000 (15:04 +0000)
libopenjpeg/t2.c

index 3b96644f24c9b06f19ad4e67d58058eb3710097c..fb10e1b266f0a74a9d2795ab0d7451a2a7b28603 100644 (file)
@@ -639,7 +639,7 @@ static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_t
 
 #endif /* USE_JPWL */
                                
-                               cblk->data = (unsigned char*) opj_realloc(cblk->data, (cblk->len + seg->newlen) * sizeof(unsigned char*));
+                               cblk->data = (unsigned char*) opj_realloc(cblk->data, (cblk->len + seg->newlen) * sizeof(unsigned char));
                                memcpy(cblk->data + cblk->len, c, seg->newlen);
                                if (seg->numpasses == 0) {
                                        seg->data = &cblk->data;