Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)

This commit is contained in:
xiaoxiaoafeifei 2021-07-14 09:35:13 +08:00 committed by GitHub
parent 08ba6a1638
commit 0afbdcf3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;