File openjpeg2-CVE-2020-27823.patch of Package openjpeg2.36921
Index: openjpeg-2.1.0/src/bin/jp2/convert.c
===================================================================
--- openjpeg-2.1.0.orig/src/bin/jp2/convert.c
+++ openjpeg-2.1.0/src/bin/jp2/convert.c
@@ -3572,8 +3572,8 @@ opj_image_t *pngtoimage(const char *read
image->x0 = (OPJ_UINT32)params->image_offset_x0;
image->y0 = (OPJ_UINT32)params->image_offset_y0;
- image->x1 = (OPJ_UINT32)(image->x0 + (width - 1) * (OPJ_UINT32)sub_dx + 1 + image->x0);
- image->y1 = (OPJ_UINT32)(image->y0 + (height - 1) * (OPJ_UINT32)sub_dy + 1 + image->y0);
+ image->x1 = (OPJ_UINT32)(image->x0 + (width - 1) * (OPJ_UINT32)sub_dx + 1);
+ image->y1 = (OPJ_UINT32)(image->y0 + (height - 1) * (OPJ_UINT32)sub_dy + 1);
r = image->comps[0].data;
g = image->comps[1].data;