diff options
| author | xiaoxiaoafeifei <lliangliang2007@163.com> | 2021-07-14 09:35:13 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-14 03:35:13 +0200 |
| commit | 0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d (patch) | |
| tree | 51304ca59ab11a80ae991fee5dce0a5b75a0ad19 /src/bin | |
| parent | 08ba6a1638242e7ddd884c6c9777a232c0ef82fd (diff) | |
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index 0e028735..18ead672 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -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(¶meters); return EXIT_FAILURE; |
