From a5eede3a67c8222a3df6f1249f2b10af6234c1ab Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sun, 21 Sep 2003 19:25:30 +0000 Subject: [PATCH] Fix for PNGTranslator erroring on bad data following image data git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4779 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/translators/pngtranslator/PNGTranslator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp index 546d41aafb..a8eb516001 100644 --- a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp +++ b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp @@ -658,9 +658,12 @@ translate_from_png_to_bits(BPositionIO *inSource, BPositionIO *outDestination, outDestination->Write(prow, width * kbytes); } - // finish reading, pass NULL for info because I - // don't need the extra data - png_read_end(ppng, NULL); + // Here would be the place to call + // png_read_end(). However, since this program + // is not interested in PNG comments or + // date / time info and errors found by + // png_read_end() will cause translation to fail, + // png_read_end() is not called here. result = B_OK; break;