tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

1737038.patch (962B)


      1 diff --git a/pngwutil.c b/pngwutil.c
      2 --- a/pngwutil.c
      3 +++ b/pngwutil.c
      4 @@ -353,8 +353,10 @@ png_deflate_claim(png_structrp png_ptr, 
      5          if ((png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) != 0)
      6             strategy = png_ptr->zlib_strategy;
      7 
      8 +#ifdef PNG_WRITE_FILTER_SUPPORTED
      9          else if (png_ptr->do_filter != PNG_FILTER_NONE)
     10             strategy = PNG_Z_DEFAULT_STRATEGY;
     11 +#endif
     12 
     13          else
     14             strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY;
     15 @@ -840,12 +842,16 @@ png_write_IHDR(png_structrp png_ptr, png
     16 
     17    if ((png_ptr->do_filter) == PNG_NO_FILTERS)
     18    {
     19 +#ifdef PNG_WRITE_FILTER_SUPPORTED
     20       if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
     21           png_ptr->bit_depth < 8)
     22          png_ptr->do_filter = PNG_FILTER_NONE;
     23 
     24       else
     25          png_ptr->do_filter = PNG_ALL_FILTERS;
     26 +#else
     27 +      png_ptr->do_filter = PNG_FILTER_NONE;
     28 +#endif
     29    }
     30 
     31    png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */