summaryrefslogtreecommitdiff
path: root/src/im_format_jp2.cpp
diff options
context:
space:
mode:
authorscuri <scuri>2010-04-08 13:18:59 +0000
committerscuri <scuri>2010-04-08 13:18:59 +0000
commitdf1b1b30b99eeb8e66f79f4fdcd6cc458173bf47 (patch)
tree8f393bfa3ad717e408ab26cf19909e09acd45d8d /src/im_format_jp2.cpp
parent5d0da713f644f05f95448e3946ac2284c1038421 (diff)
Fixed: invalid memory access when saving an image with the JPEG 2000 format.
Diffstat (limited to 'src/im_format_jp2.cpp')
-rw-r--r--src/im_format_jp2.cpp3
1 files changed, 2 insertions, 1 deletions
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);