]> granicus.if.org Git - php/commitdiff
improve open_basedir checks in GD
authorAntony Dovgal <tony2001@php.net>
Tue, 17 Jan 2006 23:49:14 +0000 (23:49 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 17 Jan 2006 23:49:14 +0000 (23:49 +0000)
ext/gd/gd.c

index faa48361796b15b7ee56d672c4c7dc596e5f6ae0..23ec39588e0760e908283ecae6a109e7dba4be59 100644 (file)
@@ -2966,6 +2966,8 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
        fontname = (unsigned char *) fontname;
 #endif
 
+       PHP_GD_CHECK_OPEN_BASEDIR(fontname, "Invalid font filename");
+       
 #ifdef USE_GD_IMGSTRTTF
 # if HAVE_GD_STRINGFTEX
        if (extended) {