summaryrefslogtreecommitdiff
path: root/libopenjpeg/cio.c
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2007-07-08 16:38:51 +0000
committerAntonin Descampe <antonin@gmail.com>2007-07-08 16:38:51 +0000
commitbdb18ab19c5f0770c32304f13c8af7b46748a8d9 (patch)
tree6803dea28a7fab83225d6be07bf90e1f1dfc80de /libopenjpeg/cio.c
parent167fb6337b005fd16e6015b695ec01421f8182e5 (diff)
fixed the size of the memory allocation in cio.c (confusion between bits and bytes)
Diffstat (limited to 'libopenjpeg/cio.c')
-rw-r--r--libopenjpeg/cio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopenjpeg/cio.c b/libopenjpeg/cio.c
index 6082e9be..cb0c3e4a 100644
--- a/libopenjpeg/cio.c
+++ b/libopenjpeg/cio.c
@@ -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);