ZSTD: fix flush issue that can cause endless loop in ZSTDEncode()

Fixes https://github.com/OSGeo/gdal/issues/833
This commit is contained in:
Even Rouault 2018-08-07 22:36:26 +02:00
parent 7bad03e938
commit 97a9e1a677
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -262,7 +262,6 @@ ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
tif->tif_rawcc = tif->tif_rawdatasize;
TIFFFlushData1(tif);
sp->out_buffer.dst = tif->tif_rawcp;
sp->out_buffer.size = (size_t) tif->tif_rawcc;
sp->out_buffer.pos = 0;
}
} while( in_buffer.pos < in_buffer.size );
@ -292,7 +291,6 @@ ZSTDPostEncode(TIFF* tif)
tif->tif_rawcc = sp->out_buffer.pos;
TIFFFlushData1(tif);
sp->out_buffer.dst = tif->tif_rawcp;
sp->out_buffer.size = (size_t) tif->tif_rawcc;
sp->out_buffer.pos = 0;
}
} while (zstd_ret != 0);