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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user