fixed the size of the memory allocation in cio.c (confusion between bits and bytes)
authorAntonin Descampe <antonin@gmail.com>
Sun, 8 Jul 2007 16:38:51 +0000 (16:38 +0000)
committerAntonin Descampe <antonin@gmail.com>
Sun, 8 Jul 2007 16:38:51 +0000 (16:38 +0000)
ChangeLog
libopenjpeg/cio.c

index 30b9775421b1958879c97fdab3fef351d1a42f8d..c81800daf28fdad8047fbb4754a01931109bce96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+July 8, 2007
+* [ANTONIN] fixed the size of the memory allocation in cio.c (confusion between bits and bytes)
+
 June 21, 2007
 * [FOD] Output image color space set when decoding a JP2 file in jp2.c
 + [GB] Previous, home, and next frame buttons for exploring MJ2 files in OPJViewer
index 6082e9be9f038736fc9755be97e769dcf9240781..cb0c3e4a3a14de2f2a09ee5cb4eb67797a561378 100644 (file)
@@ -58,7 +58,7 @@ opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer
                                opj_free(cio);
                                return NULL;
                }
-               cio->length = (int) (1.3 * cp->img_size);
+               cio->length = (int) (0.1625 * cp->img_size); /* 0.1625 = 1.3/8 */
                cio->buffer = (unsigned char *)opj_malloc(cio->length);
                if(!cio->buffer) {
                        opj_free(cio);