X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b47c832e5529dc6c632536b4665a005f0a85aec8..d94de683a60b20153591cc3f8f52a97cf9ce9453:/src/tiff/tif_dumpmode.c?ds=sidebyside diff --git a/src/tiff/tif_dumpmode.c b/src/tiff/tif_dumpmode.c index 2c1e2b9f78..ccb57f71c1 100644 --- a/src/tiff/tif_dumpmode.c +++ b/src/tiff/tif_dumpmode.c @@ -30,6 +30,7 @@ * "Null" Compression Algorithm Support. */ #include "tiffiop.h" +#include /* * Encode a hunk of pixels. @@ -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.