summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-25 13:39:50 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-02-25 13:39:50 +0000
commita466755bbb02b6e02f4d1e34f5c2f32df7b71d75 (patch)
treebc661099b5faeea00c8d0841107831cb1fa00696 /src/lib
parent901c9d8ae02a264fef45f700e11e7cda99b1d9ed (diff)
[trunk] import commit 83dad6a76536222a3a51146f942e733a2e90ec52 from ghostpdl
fix potential NULL-pointer dereference caused by testing the wrong variable after opj_realloc (happens only in OOM situations) Update issue 225
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/jp2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c
index af25f328..d3f7515b 100644
--- a/src/lib/openjp2/jp2.c
+++ b/src/lib/openjp2/jp2.c
@@ -1719,7 +1719,7 @@ OPJ_BOOL opj_jp2_read_header_procedure( opj_jp2_t *jp2,
if (l_current_handler != 00) {
if (l_current_data_size > l_last_data_size) {
OPJ_BYTE* new_current_data = (OPJ_BYTE*)opj_realloc(l_current_data,l_current_data_size);
- if (!l_current_data){
+ if (!new_current_data) {
opj_free(l_current_data);
opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle jpeg2000 box\n");
return OPJ_FALSE;