summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorFreeimage <freeimage@aliceadsl.fr>2006-01-18 20:10:58 +0000
committerFreeimage <freeimage@aliceadsl.fr>2006-01-18 20:10:58 +0000
commitd5ecae07ad69619fb4fae18df7e5812c3ce28d8c (patch)
tree4a803a3339c011d87aa9605c90efee2bf699cc03 /libopenjpeg
parent8f9f70f922e4a73575ff71e0d41abf1eae4c5526 (diff)
fixed a bug in opj_cio_open when saving 48-bit images (wrong buffer size calculation)
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/cio.c2
1 files changed, 1 insertions, 1 deletions
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);