2007-01-19 21:37:36 UTC
I've checked your test image and everything seems perfect to me ...
Here is the main result of my debugging:
in pngrutil.c
function png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
you have:
#ifdef PNG_iTXt_SUPPORTED
text_ptr->lang = NULL;
text_ptr->lang_key = NULL;
text_ptr->itxt_length = 0;
#endif
Then in PluginPNG.cpp
function static BOOL ReadMetadata(png_structp png_ptr, png_infop info_ptr, FIBITMAP *dib)
you have:
DWORD tag_length = MAX(text_ptr[i].text_length, text_ptr[i].itxt_length);
that is translated to:
DWORD tag_length = MAX(23, 0);
=> thus tag_length = 23 and the buffer text_ptr[i].text is OK (checked with a memory leak detector and also with the VS2003 debugger)
So I don't see what could be wrong ? As I said before, you cannot have undefined values. The only possible problem I could see is that you link FreeImage with the OS 'native' libpng instead of the FreeImage one ...
Hervé