2020.12.11 19:08 "Re: [Tiff] SIGSEGV within TIFFGetField()", by OnlineCop
This is great info; thank you. This got me past my segfault.
Since custom values for TIFFGetField() for both TIFF_ASCII and non-TIFF_ASCII types require 4 parameters, would it be safe to remove the if() statement?
Can I replace this:
if (tiff_field_info[i].field_type == TIFFDataType::TIFF_ASCII) {
status = TIFFGetField(tif, tiff_field_info[i].field_tag, &field_value); /*** <-- this line SIGSEGV's ***/
if (status != 0) {
field_count = strlen( static_cast<char*>(field_value) );
}
} else {
status = TIFFGetField(tif, tiff_field_info[i].field_tag, &field_count, &field_value);
}
with simply:
status = TIFFGetField(tif, tiff_field_info[i].field_tag, &field_count, &field_value);
@onlinecop