diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-12 21:17:36 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-12 21:17:36 +0000 |
commit | 7a282ddcfd28a9c1411dd81079591b085e56271f (patch) | |
tree | aaa3c8a43b8f298e56f640f37abbc396b3496c0a | |
parent | 44b7c16b03774c682eb6343b688f021b9ed093db (diff) | |
download | php-git-7a282ddcfd28a9c1411dd81079591b085e56271f.tar.gz |
Fixed bug #20974 (added missing sanity check).
-rw-r--r-- | ext/gd/gd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index cdc01686c6..f22bdd1eed 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3390,6 +3390,13 @@ PHP_FUNCTION(imagepstext) 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]); amount_kern += _str[i-1] == ' ' ? space : 0; |