[Python-modules-commits] r11834 - in packages/gamera/trunk/debian (2 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat Feb 20 18:27:13 UTC 2010


    Date: Saturday, February 20, 2010 @ 18:27:11
  Author: jwilk
Revision: 11834

Fix buffer overflow in TIFF export code.

Modified:
  packages/gamera/trunk/debian/changelog
  packages/gamera/trunk/debian/patches/tiff-support-64bit.diff

Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog	2010-02-20 18:02:38 UTC (rev 11833)
+++ packages/gamera/trunk/debian/changelog	2010-02-20 18:27:11 UTC (rev 11834)
@@ -12,7 +12,7 @@
       python-imaging-dbg.
   * Fix TIFF export on 64-bit machines (closes: #570559).
 
- -- Jakub Wilk <jwilk at debian.org>  Sat, 20 Feb 2010 17:33:33 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 20 Feb 2010 17:42:31 +0100
 
 gamera (3.2.3-2) unstable; urgency=low
 

Modified: packages/gamera/trunk/debian/patches/tiff-support-64bit.diff
===================================================================
--- packages/gamera/trunk/debian/patches/tiff-support-64bit.diff	2010-02-20 18:02:38 UTC (rev 11833)
+++ packages/gamera/trunk/debian/patches/tiff-support-64bit.diff	2010-02-20 18:27:11 UTC (rev 11834)
@@ -6,13 +6,13 @@
 Index: gamera-3.2.4/include/plugins/tiff_support.hpp
 ===================================================================
 --- gamera-3.2.4.orig/include/plugins/tiff_support.hpp	2010-02-20 16:38:27.000000000 +0100
-+++ gamera-3.2.4/include/plugins/tiff_support.hpp	2010-02-20 16:52:35.000000000 +0100
-@@ -218,12 +218,13 @@
++++ gamera-3.2.4/include/plugins/tiff_support.hpp	2010-02-20 19:11:55.000000000 +0100
+@@ -218,12 +218,12 @@
      template<class T>
      void operator()(const T& matrix, TIFF* tif) {
        TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-+      assert(TIFFScanlineSize(tif) & 3 == 0);
-       tdata_t buf = _TIFFmalloc(TIFFScanlineSize(tif));
+-      tdata_t buf = _TIFFmalloc(TIFFScanlineSize(tif));
++      tdata_t buf = _TIFFmalloc(((TIFFScanlineSize(tif) - 1) | 3) + 1);
        if (!buf)
          throw std::runtime_error("Error allocating scanline");
        TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);




More information about the Python-modules-commits mailing list