1*3ac0a46fSAndroid Build Coastguard Workerdiff --git a/third_party/libtiff/tif_pixarlog.c b/third_party/libtiff/tif_pixarlog.c 2*3ac0a46fSAndroid Build Coastguard Workerindex 5c0346b6e..2e22b3318 100644 3*3ac0a46fSAndroid Build Coastguard Worker--- a/third_party/libtiff/tif_pixarlog.c 4*3ac0a46fSAndroid Build Coastguard Worker+++ b/third_party/libtiff/tif_pixarlog.c 5*3ac0a46fSAndroid Build Coastguard Worker@@ -882,7 +882,7 @@ static int PixarLogDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) 6*3ac0a46fSAndroid Build Coastguard Worker return (0); 7*3ac0a46fSAndroid Build Coastguard Worker } 8*3ac0a46fSAndroid Build Coastguard Worker /* Check that we will not fill more than what was allocated */ 9*3ac0a46fSAndroid Build Coastguard Worker- if ((tmsize_t)sp->stream.avail_out > sp->tbuf_size) 10*3ac0a46fSAndroid Build Coastguard Worker+ if (sp->tbuf_size < 0 || sp->stream.avail_out > (uInt) sp->tbuf_size) 11*3ac0a46fSAndroid Build Coastguard Worker { 12*3ac0a46fSAndroid Build Coastguard Worker TIFFErrorExtR(tif, module, "sp->stream.avail_out > sp->tbuf_size"); 13*3ac0a46fSAndroid Build Coastguard Worker return (0); 14