From ca5b10938a7528a5db58288ce5ff3694e13148a5 Mon Sep 17 00:00:00 2001 From: Mickael Savinaud Date: Tue, 11 Oct 2011 13:49:58 +0000 Subject: [PATCH] [trunk] WIP: correct a segfault inside j2k_dump output --- CHANGES | 1 + libopenjpeg/j2k.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index e0121f1a..07548624 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ What's New for OpenJPEG + : added October 11, 2011 +* [mickael] WIP: correct a segfault inside j2k_dump output * [mickael] WIP: correct some segfault with win platform and remove a aligned allocation which produce error when a realloc is done on this pointer. * [mickael] WIP: add stream length value to read unknown marker size, backport 855 into V2 framework, correct memory leak into get_cstr_info * [mickael] WIP: add output elements about decoding of jp2 files with last tile part lenght equal zero diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index 2de55b5e..bd429af0 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -6784,8 +6784,8 @@ opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_v2_t* p_j2k) l_tccp_info->qmfbid = l_tccp->qmfbid; if (l_tccp->numresolutions < J2K_MAXRLVLS) { - memcpy(l_tccp_info->prch, l_tccp->prch, l_tccp->numresolutions - 1); - memcpy(l_tccp_info->prcw, l_tccp->prcw, l_tccp->numresolutions - 1); + memcpy(l_tccp_info->prch, l_tccp->prch, l_tccp->numresolutions); + memcpy(l_tccp_info->prcw, l_tccp->prcw, l_tccp->numresolutions); } /* quantization style*/