From df1b1b30b99eeb8e66f79f4fdcd6cc458173bf47 Mon Sep 17 00:00:00 2001 From: scuri Date: Thu, 8 Apr 2010 13:18:59 +0000 Subject: Fixed: invalid memory access when saving an image with the JPEG 2000 format. --- html/en/history.html | 5 ++++- src/im_format_jp2.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/html/en/history.html b/html/en/history.html index c69603d..ed4e2d6 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -12,7 +12,7 @@

History of Changes

- CVS (16/Feb/2010)

+ CVS (08/Apr/2010)

Version 3.6 (26/Jan/2010)

diff --git a/src/im_format_jp2.cpp b/src/im_format_jp2.cpp index de25e88..1d30898 100644 --- a/src/im_format_jp2.cpp +++ b/src/im_format_jp2.cpp @@ -3,7 +3,7 @@ * * See Copyright Notice in im_lib.h * See libJaper Copyright Notice in jasper.h - * $Id: im_format_jp2.cpp,v 1.2 2008/12/03 15:45:34 scuri Exp $ + * $Id: im_format_jp2.cpp,v 1.3 2010/04/08 13:19:00 scuri Exp $ */ #include "im_format.h" @@ -378,6 +378,7 @@ int imFileFormatJP2::WriteImageInfo() // Adobe XMP data = attrib_table->Get("XMLPacket", NULL, &size); + if (data) { jas_metadata_box_t *metabox = &image->metadata.boxes[JAS_IMAGE_BOX_XMP]; jas_box_alloc(metabox, size); -- cgit v1.2.3