cvs: php4 /ext/gd gd.c
| From: | Jouni Ahto | Date: | Fri, 16 Jun 2000 10:09:12 +0000 |
| Subject: | cvs: php4 /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-308@lists.php.net to get a copy of this message | ||
jah Fri Jun 16 03:09:12 2000 EDT
Modified files:
/php4/ext/gd gd.c
Log:
- Forgot to test check for errors in two places.
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.68 php4/ext/gd/gd.c:1.69
--- php4/ext/gd/gd.c:1.68 Thu Jun 15 16:45:04 2000
+++ php4/ext/gd/gd.c Fri Jun 16 03:09:12 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.68 2000/06/15 23:45:04 andi Exp $ */
+/* $Id: gd.c,v 1.69 2000/06/16 10:09:12 jah Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1915,7 +1915,10 @@
}
}
- T1_LoadFont(f_ind);
+ if (T1_LoadFont(f_ind)) {
+ php_error(E_WARNING, "Couldn't load the font");
+ RETURN_FALSE;
+ }
font = (int *) emalloc(sizeof(int));
*font = f_ind;
@@ -2221,7 +2224,10 @@
space, T1_KERNING, (*sz)->value.lval, transform);
}
- if (T1_errno) RETURN_FALSE;
+ if (T1_errno) {
+ php_error(E_WARNING, "libt1 returned error %d", T1_errno);
+ RETURN_FALSE;
+ }
h_lines = str_img->metrics.ascent - str_img->metrics.descent;
v_lines = str_img->metrics.rightSideBearing - str_img->metrics.leftSideBearing;
@@ -2239,6 +2245,7 @@
}
if (array_init(return_value) == FAILURE) {
+ php_error(E_WARNING, "Couldn't initialize array for returning bounding box");
RETURN_FALSE;
}