From d5ecae07ad69619fb4fae18df7e5812c3ce28d8c Mon Sep 17 00:00:00 2001 From: Freeimage Date: Wed, 18 Jan 2006 20:10:58 +0000 Subject: [PATCH] fixed a bug in opj_cio_open when saving 48-bit images (wrong buffer size calculation) --- libopenjpeg/cio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libopenjpeg/cio.c b/libopenjpeg/cio.c index 0b701baf..c9c59bc2 100644 --- a/libopenjpeg/cio.c +++ b/libopenjpeg/cio.c @@ -57,7 +57,7 @@ opj_cio_t* opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length) opj_free(cio); return NULL; } - cio->length = cp->tdx * cp->tdy * cp->tw * cp->th * 2; + cio->length = cp->tdx * cp->tdy * cp->tw * cp->th * 4; cio->buffer = (unsigned char *)opj_malloc(cio->length); if(!cio->buffer) { opj_free(cio); -- 2.30.2