MFH: improve open_basedir checks in GD
authorAntony Dovgal <tony2001@php.net>
Tue, 17 Jan 2006 23:47:08 +0000 (23:47 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 17 Jan 2006 23:47:08 +0000 (23:47 +0000)
ext/gd/gd.c

index 40236805c4c00b75c95138c90f33e374122d8313..18bbbbab364d6b21e7aece4617f5d30df86f8ddf 100644 (file)
@@ -3201,6 +3201,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) {