cvs: gd /libgd ISSUES gd.c

[email protected] ("Pierre-Alain Joye")
Newsgroups php.gd.cvs
Message-ID <cvspajoye1167856290@cvsserver>
pajoye		Wed Jan  3 20:31:30 2007 UTC

  Modified files:              
    /gd/libgd	gd.c ISSUES 
  Log:
  #21, gdImageCopyResized sanity check for allocation failures
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.40&r2=1.41&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.40 gd/libgd/gd.c:1.41
--- gd/libgd/gd.c:1.40	Wed Jan  3 20:25:16 2007
+++ gd/libgd/gd.c	Wed Jan  3 20:31:29 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.40 2007/01/03 20:25:16 pajoye Exp $ */
+/* $Id: gd.c,v 1.41 2007/01/03 20:31:29 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -2274,7 +2274,15 @@
     return;
   }
   stx = (int *) gdMalloc (sizeof (int) * srcW);
+	if (!stx) {
+		return;
+	}
+
   sty = (int *) gdMalloc (sizeof (int) * srcH);
+	if (!sty) {
+		return;
+	}
+
   /* Fixed by Mao Morimoto 2.0.16 */
   for (i = 0; (i < srcW); i++)
     {
http://cvs.php.net/viewvc.cgi/gd/libgd/ISSUES?r1=1.19&r2=1.20&diff_format=u
Index: gd/libgd/ISSUES
diff -u gd/libgd/ISSUES:1.19 gd/libgd/ISSUES:1.20
--- gd/libgd/ISSUES:1.19	Wed Jan  3 20:25:16 2007
+++ gd/libgd/ISSUES	Wed Jan  3 20:31:29 2007
@@ -42,3 +42,4 @@
 #18, Removed invalid gdFree call when overflow2 fails
 #19, Use abs instead of fbas in HWB_Diff (Nick Atty)
 #20, Fixed gdImageCopyMergeGray when used with a true color image
+#21, gdImageCopyResized sanity check for allocation failures
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.