From 3dc8ad3068f5e740e78930c79e8fdadc0619d801 Mon Sep 17 00:00:00 2001 From: corvid Date: Sun, 14 Feb 2010 02:21:51 +0000 Subject: use png_sig_cmp() It seems that libpng 1.4 got rid of png_check_sig() (http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt) The CHANGES doc that came with my libpng says that it was already obsolete by at least January 1999 (v. 1.0.2a). I checked 1.0.0 from March 98, and it has png_sig_cmp. I checked ummm... 0.89c, I think it was (it was from May 96, in any case), and it did not have it yet. I imagine we can ignore pre-1.0 from more than twelve years ago... --- src/png.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/png.c b/src/png.c index 353ebaa3..6a5f4422 100644 --- a/src/png.c +++ b/src/png.c @@ -345,8 +345,7 @@ static void Png_write(DilloPng *png, void *Buf, uint_t BufSize) return; /* need MORE data */ } /* check the image signature - DON'T update ipbufstart! */ - if (!png_check_sig(png->ipbuf, DATASIZE)) { - /* you lied to me about it being a PNG image */ + if (png_sig_cmp(png->ipbuf, 0, DATASIZE)) { MSG_WARN("\"%s\" is not a PNG file.\n", URL_STR(png->url)); png->state = IS_finished; break; -- cgit v1.2.3