Skip to content

Commit

Permalink
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized poi…
Browse files Browse the repository at this point in the history
…nter (fixes uclouvain#1368) (uclouvain#1369)
  • Loading branch information
xiaoxiaoafeifei authored and DanielHeath committed Sep 21, 2021
1 parent 9d4fd80 commit 78401a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/jp2/opj_decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ int main(int argc, char **argv)
int it_image;
num_images = get_num_images(img_fol.imgdirpath);

dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
if (!dirptr) {
destroy_parameters(&parameters);
return EXIT_FAILURE;
Expand Down

0 comments on commit 78401a9

Please sign in to comment.