File openjpeg2-CVE-2020-15389.patch of Package openjpeg2.36921
Index: openjpeg-2.1.0/src/bin/jp2/opj_decompress.c
===================================================================
--- openjpeg-2.1.0.orig/src/bin/jp2/opj_decompress.c
+++ openjpeg-2.1.0/src/bin/jp2/opj_decompress.c
@@ -680,10 +680,6 @@ static void info_callback(const char *ms
int main(int argc, char **argv)
{
opj_dparameters_t 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;
char indexfilename[OPJ_PATH_LEN]; /* index file name */
@@ -736,6 +732,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;
fprintf(stderr,"\n");