diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-06-30 22:05:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-30 22:05:13 +0200 |
| commit | cbee7891a0ee664dd83ca09553d2e30da716a883 (patch) | |
| tree | 279e92ed0c8220e00bc517a1886575cca68548ea /src | |
| parent | 172c8ae5cf230ff74b5814daf29e5b577aa30a9b (diff) | |
| parent | e8e258ab049240c2dd1f1051b4e773b21e2d3dc0 (diff) | |
Merge pull request #1262 from rouault/fix_1261
opj_decompress: fix double-free on input directory with mix of valid and invalid images
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index 7eeb0952..2634907f 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -1316,10 +1316,6 @@ static opj_image_t* upsample_image_components(opj_image_t* original) int main(int argc, char **argv) { opj_decompress_parameters parameters; /* decompression parameters */ - opj_image_t* image = NULL; - opj_stream_t *l_stream = NULL; /* Stream */ - opj_codec_t* l_codec = NULL; /* Handle to a decompressor */ - opj_codestream_index_t* cstr_index = NULL; OPJ_INT32 num_images, imageno; img_fol_t img_fol; @@ -1393,6 +1389,10 @@ int main(int argc, char **argv) /*Decoding image one by one*/ for (imageno = 0; imageno < num_images ; imageno++) { + opj_image_t* image = NULL; + opj_stream_t *l_stream = NULL; /* Stream */ + opj_codec_t* l_codec = NULL; /* Handle to a decompressor */ + opj_codestream_index_t* cstr_index = NULL; if (!parameters.quiet) { fprintf(stderr, "\n"); |
