~ubuntu-branches/ubuntu/precise/tiff/precise-security

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2014-81xx-8.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-03-30 08:11:18 UTC
  • Revision ID: package-import@ubuntu.com-20150330081118-bvaoaii1act27voq
Tags: 3.9.5-2ubuntu1.7
* SECURITY UPDATE: Fix multiple security issues
  - debian/patches/CVE-2014-81xx-1.patch to CVE-2014-81xx-11.patch
  - debian/patches/CVE-2014-8128-5.patch
  - debian/patches/CVE-2014-9655-1.patch to CVE-2014-9655-3.patch
  - debian/patches/read_overrun.patch
  - debian/patches/CVE-2014-8130.patch
  - CVE-2014-8127 (partially)
  - CVE-2014-8128
  - CVE-2014-8129
  - CVE-2014-8130
  - CVE-2014-9330
  - CVE-2014-9655

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 0782c759084daaf9e4de7ee6be7543081823455e Mon Sep 17 00:00:00 2001
 
2
From: erouault <erouault>
 
3
Date: Sun, 21 Dec 2014 20:58:29 +0000
 
4
Subject: [PATCH] * tools/tiff2bw.c: when Photometric=RGB, the utility only
 
5
 works if SamplesPerPixel = 3. Enforce that
 
6
 http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127)
 
7
 
 
8
---
 
9
 ChangeLog       | 6 ++++++
 
10
 tools/tiff2bw.c | 5 +++++
 
11
 2 files changed, 11 insertions(+)
 
12
 
 
13
Index: tiff-3.9.5/tools/tiff2bw.c
 
14
===================================================================
 
15
--- tiff-3.9.5.orig/tools/tiff2bw.c     2015-03-30 07:47:25.321241804 -0400
 
16
+++ tiff-3.9.5/tools/tiff2bw.c  2015-03-30 07:47:25.317241770 -0400
 
17
@@ -167,6 +167,11 @@
 
18
                    argv[optind], samplesperpixel);
 
19
                return (-1);
 
20
        }
 
21
+       if( photometric == PHOTOMETRIC_RGB && samplesperpixel != 3) {
 
22
+               fprintf(stderr, "%s: Bad samples/pixel %u for PHOTOMETRIC_RGB.\n",
 
23
+                   argv[optind], samplesperpixel);
 
24
+               return (-1);
 
25
+       }
 
26
        TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
 
27
        if (bitspersample != 8) {
 
28
                fprintf(stderr,