TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963

This commit is contained in:
Even Rouault 2018-05-12 14:24:15 +02:00
parent 6150fd4349
commit de144fd228
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -695,8 +695,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
}
break;
default:
assert(0); /* we should never get here */
break;
TIFFErrorExt(tif->tif_clientdata,module,
"Cannot write tag %d (%s)",
TIFFFieldTag(o),
o->field_name ? o->field_name : "unknown");
goto bad;
}
}
}