File tiff-CVE-2022-48281.patch of Package tiff

Index: tiff-4.5.0/tools/tiffcrop.c
===================================================================
--- tiff-4.5.0.orig/tools/tiffcrop.c
+++ tiff-4.5.0/tools/tiffcrop.c
@@ -8591,7 +8591,7 @@ static int processCropSelections(struct
                     cropsize + NUM_BUFF_OVERSIZE_BYTES);
             else
             {
-                prev_cropsize = seg_buffs[0].size;
+                prev_cropsize = seg_buffs[i].size;
                 if (prev_cropsize < cropsize)
                 {
                     next_buff = _TIFFrealloc(
openSUSE Build Service is sponsored by