From bba046b3a2d67b2adb5cf1d131bd04fcd59f889e Mon Sep 17 00:00:00 2001 From: pajoye Date: Sun, 5 Nov 2006 15:01:47 +0000 Subject: - #12, initialize the sig buf not infile, good that we don't use getC... --- src/ISSUES | 2 ++ src/gd_png.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ISSUES b/src/ISSUES index 654811c..c96f67d 100644 --- a/src/ISSUES +++ b/src/ISSUES @@ -29,3 +29,5 @@ GDBUGS NEWS #10, gdImageFilledEllipse does not respect transparency #11, gdImageCreateFromPng* possible crash with empty file (Thanks Antony Dovgal to have catched it) +#12, gdImageCreateFromPngCrx, initialize the signature buffer not the infile + CTX (Takeshi Abe) diff --git a/src/gd_png.c b/src/gd_png.c index 8d2fb81..4a957fd 100644 --- a/src/gd_png.c +++ b/src/gd_png.c @@ -139,7 +139,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile) /* Make sure the signature can't match by dumb luck -- TBB */ /* GRR: isn't sizeof(infile) equal to the size of the pointer? */ - memset (infile, 0, sizeof (infile)); + memset (sig, 0, sizeof (sig)); /* first do a quick check that the file really is a PNG image; could * have used slightly more general png_sig_cmp() function instead */ -- cgit v1.2.1