File libpng16-CVE-2018-13785.patch of Package libpng16.8173

Index: libpng-1.6.34/pngrutil.c
===================================================================
--- libpng-1.6.34.orig/pngrutil.c	2017-09-29 10:40:57.000000000 +0200
+++ libpng-1.6.34/pngrutil.c	2018-08-01 09:59:02.399741891 +0200
@@ -3149,7 +3149,7 @@ png_check_chunk_length(png_const_structr
    {
       png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
       size_t row_factor =
-         (png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
+         ((size_t)png_ptr->width * (size_t)png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
           + 1 + (png_ptr->interlaced? 6: 0));
       if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
          idat_limit=PNG_UINT_31_MAX;
openSUSE Build Service is sponsored by