summaryrefslogtreecommitdiff
path: root/libopenjpeg/t2.c
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-01-11 19:03:22 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-01-11 19:03:22 +0000
commite1340fe0874b7648d57639ffb244f835a537f9b7 (patch)
tree8cb4de9adcfda0c2b6f8e312ff2f3d1d8ddd9db9 /libopenjpeg/t2.c
parent32e80bc4a75a8c864254289fa0fed87601a38a7c (diff)
BUG: 26 Fix issue with memory consumption.
Diffstat (limited to 'libopenjpeg/t2.c')
-rw-r--r--libopenjpeg/t2.c2
1 files changed, 1 insertions, 1 deletions
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;