Skip to content

Commit 0afbdcf

Browse files
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
1 parent 08ba6a1 commit 0afbdcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/jp2/opj_decompress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ int main(int argc, char **argv)
13561356
int it_image;
13571357
num_images = get_num_images(img_fol.imgdirpath);
13581358

1359-
dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
1359+
dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
13601360
if (!dirptr) {
13611361
destroy_parameters(&parameters);
13621362
return EXIT_FAILURE;

0 commit comments

Comments
 (0)