From: Mathieu Malaterre Date: Wed, 11 Jan 2012 19:03:22 +0000 (+0000) Subject: BUG: 26 Fix issue with memory consumption. X-Git-Tag: version.1.5~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1340fe0874b7648d57639ffb244f835a537f9b7;p=openjpeg BUG: 26 Fix issue with memory consumption. --- diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c index b6995f29..232a5437 100644 --- a/libopenjpeg/t2.c +++ b/libopenjpeg/t2.c @@ -568,7 +568,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;