File tiff-CVE-2017-17942,CVE-2016-5319.patch of Package tiff.34105
Index: tiff-4.0.9/tools/bmp2tiff.c
===================================================================
--- tiff-4.0.9.orig/tools/bmp2tiff.c 2018-08-27 10:42:59.151745101 +0200
+++ tiff-4.0.9/tools/bmp2tiff.c 2018-08-27 14:16:05.498611684 +0200
@@ -693,7 +693,11 @@ main(int argc, char* argv[])
}
i = 0;
j = 0;
- if (info_hdr.iBitCount == 8) { /* RLE8 */
+ if (info_hdr.iBitCount > 8) {
+ TIFFError(infilename, "Handle of this type image is not implemented");
+ goto bad;
+ }
+ else if (info_hdr.iBitCount == 8) { /* RLE8 */
while(j < uncompr_size && i < compr_size) {
if ( comprbuf[i] ) {
runlength = comprbuf[i++];