cvs: gd /libgd ISSUES gd.c
[email protected] ("Pierre-Alain Joye")
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvspajoye1167854941@cvsserver> |
pajoye Wed Jan 3 20:09:01 2007 UTC
Modified files:
/gd/libgd gd.c ISSUES
Log:
- #18, Removed invalid gdFree call when overflow2 fails
- #17, Free im->pixels as well on error
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.37&r2=1.38&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.37 gd/libgd/gd.c:1.38
--- gd/libgd/gd.c:1.37 Wed Jan 3 19:42:12 2007
+++ gd/libgd/gd.c Wed Jan 3 20:09:01 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.37 2007/01/03 19:42:12 pajoye Exp $ */
+/* $Id: gd.c,v 1.38 2007/01/03 20:09:01 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -74,8 +74,10 @@
gdImagePtr im;
if (overflow2(sizeof (unsigned char *), sy)) {
- gdFree(im);
- return NULL;
+ return NULL;
+ }
+ if (overflow2(sizeof (unsigned char *), sx)) {
+ return NULL;
}
im = (gdImage *) gdMalloc (sizeof (gdImage));
@@ -106,6 +108,7 @@
{
gdFree(im->pixels[i]);
}
+ gdFree(im->pixels);
gdFree(im);
return NULL;
}
http://cvs.php.net/viewvc.cgi/gd/libgd/ISSUES?r1=1.16&r2=1.17&diff_format=u
Index: gd/libgd/ISSUES
diff -u gd/libgd/ISSUES:1.16 gd/libgd/ISSUES:1.17
--- gd/libgd/ISSUES:1.16 Wed Jan 3 19:48:50 2007
+++ gd/libgd/ISSUES Wed Jan 3 20:09:01 2007
@@ -39,3 +39,4 @@
(John Ellson/Graphviz)
#17, Added "static" to entities_s struct declaration to avoid obscure
compiler problem on Suns (John Ellson/Graphviz)
+#18, Removed invalid gdFree call when overflow2 fails