#226 Value of tiff metadata tag (type ASCII) is truncated when tag is of variable length

None
closed
None
5
2014-03-23
2013-05-09
No

When metadata tag is of type ASCII and it's value is of variable size (TIFF_VARIABLE) this function gives length of 1 so all strings are truncated.

The code should determine the actual string length.

function tiff_read_exif_tag
...
if (fip->field_readcount == TIFF_VARIABLE || fip->field_readcount == TIFF_VARIABLE2)
value_count = 1;
...
default: {
// remember that raw_data = _TIFFmalloc(value_size * value_count);
const int value_size = _TIFFDataSize(fip->field_type); <<<< PROBLEM
size_t length = value_size * value_count;
...

Discussion

  • Hervé Drolon

    Hervé Drolon - 2013-05-12
    • status: open --> pending
    • assigned_to: Hervé Drolon
    • Group: -->
     
  • Hervé Drolon

    Hervé Drolon - 2013-05-12

    Hi,

    Thanks for the bug report. It is now fixed in the CVS.

    Hervé

     
  • Hervé Drolon

    Hervé Drolon - 2014-03-23
    • status: pending --> closed
     
  • Hervé Drolon

    Hervé Drolon - 2014-03-23

    fixed in release 3.16.0

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks