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. --- src/im_format_jp2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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