--- parser3/src/classes/image.C 2009/06/25 08:44:36 1.126 +++ parser3/src/classes/image.C 2009/07/07 05:47:43 1.129 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_IMAGE_C="$Date: 2009/06/25 08:44:36 $"; +static const char * const IDENT_IMAGE_C="$Date: 2009/07/07 05:47:43 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -731,7 +731,7 @@ static void measure_png(const String& or static void measure(const String& file_name, Measure_reader& reader, ushort& width, ushort& height, Value** exif) { - const char* file_name_cstr=file_name.cstr(String::L_FILE_SPEC); + const char* file_name_cstr=file_name.taint_cstr(String::L_FILE_SPEC); if(const char* cext=strrchr(file_name_cstr, '.')) { cext++; if(strcasecmp(cext, "GIF")==0) @@ -786,7 +786,7 @@ static void _measure(Request& r, MethodP file_read_action_under_lock(r.absolute(*file_name), "measure", file_measure_action, &info); } else { - VFile* vfile=data.as_vfile(); + VFile* vfile=data.as_vfile(String::L_AS_IS); file_name=&vfile->fields().get(name_name)->as_string(); Measure_buf_reader reader( vfile->value_ptr(), @@ -851,7 +851,7 @@ static void _html(Request& r, MethodPara /// @test wrap FILE to auto-object static gdImage* load(Request& r, const String& file_name){ - const char* file_name_cstr=r.absolute(file_name).cstr(String::L_FILE_SPEC); + const char* file_name_cstr=r.absolute(file_name).taint_cstr(String::L_FILE_SPEC); if(FILE *f=fopen(file_name_cstr, "rb")) { gdImage* image=new gdImage; bool ok=image->CreateFromGif(f); @@ -901,7 +901,7 @@ static void _gif(Request& r, MethodParam Value* content_type=new VString(*new String("image/gif")); vfile.set(false/*not tainted*/, (const char*)buf.ptr, buf.size, - file_name? file_name->cstr(String::L_FILE_SPEC): 0, + file_name? file_name->taint_cstr(String::L_FILE_SPEC): 0, content_type); r.write_no_lang(vfile);