X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94fbea122fab5a025cde3f7637f6729a9621bf1f..2b9a7d4cc2f5f55df3d83f7cf2160cf9a509a4f2:/src/tiff/tif_dumpmode.c diff --git a/src/tiff/tif_dumpmode.c b/src/tiff/tif_dumpmode.c index 3fbcc11643..ccb57f71c1 100644 --- a/src/tiff/tif_dumpmode.c +++ b/src/tiff/tif_dumpmode.c @@ -4,23 +4,23 @@ * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * - * Permission to use, copy, modify, distribute, and sell this software and + * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ @@ -30,11 +30,12 @@ * "Null" Compression Algorithm Support. */ #include "tiffiop.h" +#include /* * Encode a hunk of pixels. */ -static int LINKAGEMODE +static int DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s) { (void) s; @@ -44,6 +45,9 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s) n = cc; if (tif->tif_rawcc + n > tif->tif_rawdatasize) n = tif->tif_rawdatasize - tif->tif_rawcc; + + assert( n > 0 ); + /* * Avoid copy if client has setup raw * data buffer to avoid extra copy. @@ -64,7 +68,7 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s) /* * Decode a hunk of pixels. */ -static int LINKAGEMODE +static int DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s) { (void) s; @@ -88,7 +92,7 @@ DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s) /* * Seek forwards nrows in the current strip. */ -static int LINKAGEMODE +static int DumpModeSeek(TIFF* tif, uint32 nrows) { tif->tif_rawcp += nrows * tif->tif_scanlinesize;