[BZ#2112] tag name handling with TIFFMergeFieldInfo()
Submitted by Juergen Buchmueller (pullmoll at t-online dot de) on 2009-10-29 07:34
Description
Created an attachment (id=346)
sample code that crashes when tag names are changed to "Tag %d"
When a client application uses the same names for its tags as libtiff itself would use in the Default Tag Auto-registration - that is "Tag %d" with field_tag as number - the lib will SIGSEGV on TIFFClose().
Possible solution: Make TIFFMergeFieldInfo() return an int that indicates if the passed array is acceptable or not and reject field names that collide with internal names.
Otherwise find the code that relies on the field name to do something internally that should not be done if the field name was defined by a client application.
Attachment 346, "sample code that crashes when tag names are changed to "Tag %d"":
addtags.c