summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2008-01-22 10:35:26 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2008-01-22 10:35:26 +0000
commit04966097fc1d92fbfb6650d43b115447d5370c2c (patch)
tree7964a5585d0bcde6002060b6498475180b3f60a7
parent8c2ae8b03d58d566cddfc94628e111878ab24258 (diff)
In image.c, changed the opj_image_create0() memory allocation from malloc() to calloc() in order to avoid segfaults when freeing the memory allocated for the coding of bad images. Thanks to Christopher Layne for this improvement.
-rw-r--r--ChangeLog5
-rw-r--r--libopenjpeg/image.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 517e86a2..604a2de2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@ What's New for OpenJPEG
! : changed
+ : added
+January 22, 2008
+! [FOD] In image.c, changed the opj_image_create0() memory allocation from malloc() to calloc() in order
+ to avoid segfaults when freeing the memory allocated for the coding of bad images.
+ Thanks to Christopher Layne for this improvement.
+
January 17, 2008
+ [antonin] Initial commit of Xcode project directory (XCode 2.5 for macosx)
available targets : libopenjpeg (stat and dyn), image_to_j2k, j2k_to_image
diff --git a/libopenjpeg/image.c b/libopenjpeg/image.c
index ea8e59ea..30b7d139 100644
--- a/libopenjpeg/image.c
+++ b/libopenjpeg/image.c
@@ -27,7 +27,7 @@
#include "opj_includes.h"
opj_image_t* opj_image_create0(void) {
- opj_image_t *image = (opj_image_t*)opj_malloc(sizeof(opj_image_t));
+ opj_image_t *image = (opj_image_t*)opj_calloc(1, sizeof(opj_image_t));
return image;
}