/external/pdfium/third_party/libtiff/ |
D | tif_read.c | 35 #define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) 42 static tmsize_t 43 TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,const char* module); 44 static tmsize_t 45 TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module); 56 static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, in TIFFReadAndRealloc() 57 tmsize_t rawdata_offset, in TIFFReadAndRealloc() 62 tmsize_t threshold = INITIAL_THRESHOLD; in TIFFReadAndRealloc() 64 tmsize_t already_read = 0; in TIFFReadAndRealloc() 74 tmsize_t bytes_read; in TIFFReadAndRealloc() [all …]
|
D | 0025-upstream-OOM-gtTileContig.patch | 7 tmsize_t pos; 18 + tmsize_t bufsize; 39 - row+img->row_offset, 0, 0)==(tmsize_t)(-1) && img->stoponerr) 41 + row+img->row_offset, 0, 0)==(tmsize_t)(-1) && 48 tmsize_t pos; 60 tmsize_t tilesize; 61 tmsize_t bufsize; 98 + row+img->row_offset,0,0)==(tmsize_t)(-1) 118 row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr) 124 tmsize_t pos; [all …]
|
D | tiffio.h | 67 typedef TIFF_SSIZE_T tmsize_t; typedef 77 typedef tmsize_t tsize_t; /* i/o size in bytes */ 275 typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void*, tmsize_t); 295 extern void* _TIFFmalloc(tmsize_t s); 296 extern void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz); 297 extern void* _TIFFrealloc(void* p, tmsize_t s); 298 extern void _TIFFmemset(void* p, int v, tmsize_t c); 299 extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c); 300 extern int _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c); 302 extern int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2); [all …]
|
D | tif_write.c | 43 TIFFWriteBufferSetup((tif), NULL, (tmsize_t) -1)) 46 static int TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc); 187 tmsize_t 188 TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) in TIFFWriteEncodedStrip() 195 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() 209 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() 212 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() 222 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() 229 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() 235 return ((tmsize_t) -1); in TIFFWriteEncodedStrip() [all …]
|
D | tif_predict.c | 37 static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc); 38 static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); 39 static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); 40 static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); 41 static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); 42 static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc); 43 static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); 44 static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); 45 static int swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); 46 static int swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); [all …]
|
D | tiffiop.h | 96 typedef int (*TIFFCodeMethod)(TIFF* tif, uint8* buf, tmsize_t size, uint16 sample); 98 typedef void (*TIFFPostMethod)(TIFF* tif, uint8* buf, tmsize_t size); 154 tmsize_t tif_tilesize; /* # of bytes in a tile */ 177 tmsize_t tif_scanlinesize; /* # of bytes in a scanline */ 178 tmsize_t tif_scanlineskew; /* scanline skew for reading strips */ 180 tmsize_t tif_rawdatasize; /* # of bytes in raw data buffer */ 181 tmsize_t tif_rawdataoff; /* rawdata offset within strip */ 182 tmsize_t tif_rawdataloaded;/* amount of data in rawdata */ 184 tmsize_t tif_rawcc; /* bytes unread from raw buffer */ 187 tmsize_t tif_size; /* size of mapped file region (bytes, thus tmsize_t) */ [all …]
|
D | tif_packbits.c | 41 tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t)); in PackBitsPreEncode() 48 *(tmsize_t*)tif->tif_data = TIFFTileRowSize(tif); in PackBitsPreEncode() 50 *(tmsize_t*)tif->tif_data = TIFFScanlineSize(tif); in PackBitsPreEncode() 66 PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) in PackBitsEncode() 100 tif->tif_rawcc += (tmsize_t)(lastliteral - tif->tif_rawcp); in PackBitsEncode() 108 tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); in PackBitsEncode() 184 tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); in PackBitsEncode() 197 PackBitsEncodeChunk(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) in PackBitsEncodeChunk() 199 tmsize_t rowsize = *(tmsize_t*)tif->tif_data; in PackBitsEncodeChunk() 202 tmsize_t chunk = rowsize; in PackBitsEncodeChunk() [all …]
|
D | tif_luv.c | 167 tmsize_t tbuflen; /* buffer length */ 168 void (*tfunc)(LogLuvState*, uint8*, tmsize_t); 185 LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) in LogL16Decode() 190 tmsize_t i; in LogL16Decode() 191 tmsize_t npixels; in LogL16Decode() 195 tmsize_t cc; in LogL16Decode() 261 LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) in LogLuvDecode24() 265 tmsize_t cc; in LogLuvDecode24() 266 tmsize_t i; in LogLuvDecode24() 267 tmsize_t npixels; in LogLuvDecode24() [all …]
|
D | tif_strip.c | 129 tmsize_t 134 tmsize_t n; in TIFFVStripSize() 136 n=(tmsize_t)m; in TIFFVStripSize() 173 tmsize_t 178 tmsize_t n; in TIFFRawStripSize() 181 n=(tmsize_t)(-1); in TIFFRawStripSize() 184 n=(tmsize_t)m; in TIFFRawStripSize() 211 tmsize_t 216 tmsize_t n; in TIFFStripSize() 218 n=(tmsize_t)m; in TIFFStripSize() [all …]
|
D | 0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch | 5 @@ -79,6 +79,10 @@ int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) { 9 +int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) { 10 + return op1 > std::numeric_limits<tmsize_t>::max() / op2; 33 @@ -298,6 +298,7 @@ extern void _TIFFmemset(void* p, int v, tmsize_t c); 34 extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c); 35 extern int _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c); 37 +extern int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2);
|
D | tif_tile.c | 181 tmsize_t 186 tmsize_t n; in TIFFTileRowSize() 188 n=(tmsize_t)m; in TIFFTileRowSize() 248 tmsize_t 253 tmsize_t n; in TIFFVTileSize() 255 n=(tmsize_t)m; in TIFFVTileSize() 272 tmsize_t 277 tmsize_t n; in TIFFTileSize() 279 n=(tmsize_t)m; in TIFFTileSize()
|
D | tif_swab.c | 73 TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) in TIFFSwabArrayOfShort() 89 TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) in TIFFSwabArrayOfTriples() 105 TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) in TIFFSwabArrayOfLong() 122 TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) in TIFFSwabArrayOfLong8() 153 TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) in TIFFSwabArrayOfFloat() 184 TIFFSwabArrayOfDouble(double* dp, tmsize_t n) in TIFFSwabArrayOfDouble() 286 TIFFReverseBits(uint8* cp, tmsize_t n) in TIFFReverseBits()
|
D | tif_next.c | 49 NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) in NeXTDecode() 53 tmsize_t cc; in NeXTDecode() 55 tmsize_t scanline, n; in NeXTDecode() 89 tmsize_t off; in NeXTDecode() 107 tmsize_t op_offset = 0; in NeXTDecode()
|
D | tif_aux.c | 64 tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckRealloc() 67 tmsize_t bytes = nmemb * elem_size; in _TIFFCheckRealloc() 86 _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckMalloc() 95 tmsize_t i, n, nbytes; in TIFFDefaultTransferFunction() 98 if (td->td_bitspersample >= sizeof(tmsize_t) * 8 - 2) in TIFFDefaultTransferFunction() 101 n = ((tmsize_t)1)<<td->td_bitspersample; in TIFFDefaultTransferFunction()
|
D | tif_compress.c | 52 _TIFFNoRowEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoRowEncode() 59 _TIFFNoStripEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoStripEncode() 66 _TIFFNoTileEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoTileEncode() 96 _TIFFNoRowDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoRowDecode() 103 _TIFFNoStripDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoStripDecode() 110 _TIFFNoTileDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in _TIFFNoTileDecode() 205 _TIFFmalloc((tmsize_t)(sizeof (codec_t) + sizeof (TIFFCodec) + strlen(name)+1)); in TIFFRegisterCODEC()
|
D | tif_zip.c | 86 static int ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); 87 static int ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); 144 if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) in ZIPPreDecode() 153 ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) in ZIPDecode() 171 if ((tmsize_t)sp->stream.avail_out != occ) in ZIPDecode() 248 if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) in ZIPPreEncode() 260 ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) in ZIPEncode() 275 if ((tmsize_t)sp->stream.avail_in != cc) in ZIPEncode() 314 if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) in ZIPPostEncode()
|
D | tif_predict.h | 33 typedef int (*TIFFEncodeDecodeMethod)(TIFF* tif, uint8* buf, tmsize_t size); 42 tmsize_t stride; /* sample stride over data */ 43 tmsize_t rowsize; /* tile/strip row size */
|
D | tif_thunder.c | 88 ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) in ThunderDecode() 92 register tmsize_t cc; in ThunderDecode() 94 tmsize_t npixels; in ThunderDecode() 169 ThunderDecodeRow(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) in ThunderDecodeRow()
|
D | tif_pixarlog.c | 462 tmsize_t tbuf_size; /* only set/used on reading for now */ 599 static int PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); 600 static int PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); 640 #define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) 642 static tmsize_t 643 multiply_ms(tmsize_t m1, tmsize_t m2) in multiply_ms() 650 static tmsize_t 651 add_ms(tmsize_t m1, tmsize_t m2) in add_ms() 675 tmsize_t tbuf_size; in PixarLogSetupDecode() 744 if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) in PixarLogPreDecode() [all …]
|
D | tif_jpeg.c | 167 tmsize_t bytesperline; /* decompressed bytes per scanline */ 190 static int JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); 191 static int JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); 192 static int JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); 193 static int JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); 195 static int DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); 446 tif->tif_rawdatasize - (tmsize_t) sp->dest.free_in_buffer; in std_term_destination() 482 (tmsize_t) (sp->jpegtables_length + 1000)); in tables_empty_output_buffer() 512 sp->jpegtables = (void*) _TIFFmalloc((tmsize_t) sp->jpegtables_length); in TIFFjpeg_tables_dest() 913 if (TIFFReadFile(data->tif,data->buffer,(tmsize_t)m)!=(tmsize_t)m) in JPEGFixupTagsSubsamplingReadByte() [all …]
|
D | tif_dumpmode.c | 45 DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) in DumpModeEncode() 49 tmsize_t n; in DumpModeEncode() 78 DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) in DumpModeDecode()
|
D | tif_getimage.c | 628 tmsize_t pos; in gtTileContig() 639 tmsize_t bufsize; in gtTileContig() 696 row+img->row_offset, 0, 0)==(tmsize_t)(-1) && in gtTileContig() 703 ((tmsize_t) fromskew * img->samplesperpixel); in gtTileContig() 775 tmsize_t pos; in gtTileSeparate() 782 tmsize_t tilesize; in gtTileSeparate() 783 tmsize_t bufsize; in gtTileSeparate() 795 bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize); in gtTileSeparate() 848 row+img->row_offset,0,0)==(tmsize_t)(-1) in gtTileSeparate() 868 row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr) in gtTileSeparate() [all …]
|
D | tif_lzw.c | 128 typedef int (*decodeFunc)(TIFF*, uint8*, tmsize_t, uint16); 161 static int LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); 163 static int LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); 360 LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) in LZWDecode() 381 if ((tmsize_t) occ != occ0) in LZWDecode() 555 tif->tif_rawcc -= (tmsize_t)( (uint8*) bp - tif->tif_rawcp ); in LZWDecode() 597 LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) in LZWDecodeCompat() 615 if ((tmsize_t) occ != occ0) in LZWDecodeCompat() 883 LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) in LZWEncode() 975 tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); in LZWEncode() [all …]
|
D | tif_open.c | 101 assert(sizeof(tmsize_t)==sizeof(void*)); 119 tif = (TIFF *)_TIFFmalloc((tmsize_t)(sizeof (TIFF) + strlen(name) + 1)); 317 if (!WriteOK(tif, &tif->tif_header, (tmsize_t)(tif->tif_header_size))) { 448 tif->tif_size=(tmsize_t)n; 467 tif->tif_rawcc = (tmsize_t)-1;
|
/external/pdfium/core/fxcodec/codec/ |
D | ccodec_tiffmodule.cpp | 67 void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) { in _TIFFcalloc() 71 void* _TIFFmalloc(tmsize_t size) { in _TIFFmalloc() 80 void* _TIFFrealloc(void* ptr, tmsize_t size) { in _TIFFrealloc() 84 void _TIFFmemset(void* ptr, int val, tmsize_t size) { in _TIFFmemset() 88 void _TIFFmemcpy(void* des, const void* src, tmsize_t size) { in _TIFFmemcpy() 92 int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) { in _TIFFmemcmp() 96 int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) { in _TIFFIfMultiplicationOverflow() 97 return op1 > std::numeric_limits<tmsize_t>::max() / op2; in _TIFFIfMultiplicationOverflow()
|