iliaa Thu Dec 12 16:17:38 2002 EDT
Modified files:
/php4/ext/gd gd.c
Log:
Fixed bug #20974 (added missing sanity check).
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.239 php4/ext/gd/gd.c:1.240
--- php4/ext/gd/gd.c:1.239 Wed Dec 11 17:25:22 2002
+++ php4/ext/gd/gd.c Thu Dec 12 16:17:36 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.239 2002/12/11 22:25:22 iliaa Exp $ */
+/* $Id: gd.c,v 1.240 2002/12/12 21:17:36 iliaa Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -3389,6 +3389,13 @@
{
extend = T1_GetExtend(*f_ind);
str_path = T1_GetCharOutline(*f_ind, _str[0], Z_LVAL_PP(sz),
transform);
+
+ if (!str_path) {
+ if (T1_errno) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "libt1
+returned error %d", T1_errno);
+ }
+ RETURN_FALSE;
+ }
for (i = 1; i < Z_STRLEN_PP(str); i++) {
amount_kern = (int) T1_GetKerning(*f_ind, _str[i-1], _str[i]);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php