~ubuntu-branches/ubuntu/raring/tiff3/raring-proposed

« back to all changes in this revision

Viewing changes to libtiff/tif_strip.c

  • Committer: Package Import Robot
  • Author(s): Matthew Fischer
  • Date: 2012-10-11 12:46:14 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20121011124614-lohrvchji0wvxk96
Tags: 3.9.7-0ubuntu1
* New upstream release (LP: #1065637)
* Removed the following patches which were incorporated upstream:
  - CVE-2012-1173.patch
  - CVE-2012-2088.patch
  - CVE-2012-3401.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tif_strip.c,v 1.19.2.3 2010-12-15 00:50:30 faxguy Exp $ */
 
1
/* $Id: tif_strip.c,v 1.19.2.4 2012-06-15 21:45:04 tgl Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright (c) 1991-1997 Sam Leffler
142
142
                nrows = TIFFroundup(nrows, ycbcrsubsampling[1]);
143
143
                /* NB: don't need TIFFhowmany here 'cuz everything is rounded */
144
144
                scanline = multiply(tif, nrows, scanline, "TIFFVStripSize");
145
 
                stripsize =
146
 
                    summarize(tif, scanline,
147
 
                              multiply(tif, 2, scanline / samplingarea,
148
 
                                       "TIFFVStripSize"), "TIFFVStripSize");
 
145
                /* a zero anywhere in here means overflow, must return zero */
 
146
                if (scanline > 0) {
 
147
                        uint32 extra =
 
148
                            multiply(tif, 2, scanline / samplingarea,
 
149
                                     "TIFFVStripSize");
 
150
                        if (extra > 0)
 
151
                                stripsize = summarize(tif, scanline, extra,
 
152
                                                      "TIFFVStripSize");
 
153
                        else
 
154
                                stripsize = 0;
 
155
                } else
 
156
                        stripsize = 0;
149
157
        } else
150
158
                stripsize = multiply(tif, nrows, TIFFScanlineSize(tif),
151
159
                                     "TIFFVStripSize");