mirror of
https://github.com/php/php-src.git
synced 2025-01-04 09:53:52 +08:00
fix wrong type and useless assignments
This commit is contained in:
parent
c7a20fc4f1
commit
5cb21a4ad1
@ -3588,7 +3588,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
|
|||||||
long col = -1, x = -1, y = -1;
|
long col = -1, x = -1, y = -1;
|
||||||
int str_len, fontname_len, i, brect[8];
|
int str_len, fontname_len, i, brect[8];
|
||||||
double ptsize, angle;
|
double ptsize, angle;
|
||||||
unsigned char *str = NULL, *fontname = NULL;
|
char *str = NULL, *fontname = NULL;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
int argc = ZEND_NUM_ARGS();
|
int argc = ZEND_NUM_ARGS();
|
||||||
#if HAVE_GD_STRINGFTEX
|
#if HAVE_GD_STRINGFTEX
|
||||||
@ -3657,14 +3657,10 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
|
|||||||
{
|
{
|
||||||
char tmp_font_path[MAXPATHLEN];
|
char tmp_font_path[MAXPATHLEN];
|
||||||
|
|
||||||
if (VCWD_REALPATH(fontname, tmp_font_path)) {
|
if (!VCWD_REALPATH(fontname, tmp_font_path)) {
|
||||||
fontname = (unsigned char *) fontname;
|
|
||||||
} else {
|
|
||||||
fontname = NULL;
|
fontname = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
fontname = (unsigned char *) fontname;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PHP_GD_CHECK_OPEN_BASEDIR(fontname, "Invalid font filename");
|
PHP_GD_CHECK_OPEN_BASEDIR(fontname, "Invalid font filename");
|
||||||
|
Loading…
Reference in New Issue
Block a user