|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-19 21:35 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 21:00:01 2025 UTC |
Description: ------------ ImageTTFText and friends are not 64-bit clean. They pass pointers to ints in a zend_parse_paramters call which believes it is dealing with longs. Attached is a patch to address this problem. This problem might exist also in other functions or extensions, I didn't have time to check them. ---8<---8<--- Fix int/long usage in php_imagettftext_common oskari.saarenmaa@sumu.org --- ext/gd/gd.c~ 2005-06-19 19:40:51.000000000 +0300 +++ ext/gd/gd.c 2005-06-19 19:40:51.000000000 +0300 @@ -3109,7 +3109,8 @@ { zval *IM, *EXT = NULL; gdImagePtr im=NULL; - int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; + int fontname_len, i, brect[8]; + long col = -1, x = -1, y = -1, str_len; double ptsize, angle; unsigned char *str = NULL, *fontname = NULL; char *error = NULL; Actual result: -------------- X offset is overwritten by the setting of Y offset.