|
|
| version 1.89, 2019/11/13 21:29:51 | version 1.91, 2019/11/13 22:27:15 |
|---|---|
| Line 10 | Line 10 |
| #include "pa_vmethod_frame.h" | #include "pa_vmethod_frame.h" |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_base64.h" | |
| #include "pa_vint.h" | #include "pa_vint.h" |
| #include "pa_vmath.h" | #include "pa_vmath.h" |
| #include "pa_vfile.h" | #include "pa_vfile.h" |
| Line 668 static void _convert(Request& r, MethodP | Line 669 static void _convert(Request& r, MethodP |
| result_file->set(true /*tainted*/, 0 /*binary*/, result_str, result_length, 0, 0, &r); | result_file->set(true /*tainted*/, 0 /*binary*/, result_str, result_length, 0, 0, &r); |
| r.write(*result_file); | r.write(*result_file); |
| } else { | } else { |
| r.write(*new String(result_str, String::L_TAINTED)); // note: there can be '\0' inside | if(memchr(result_str, 0, result_length)) |
| throw Exception(PARSER_RUNTIME, 0, "Invalid \\x00 character found while converting to string. Convert to file instead."); | |
| fix_line_breaks(result_str, result_length); | |
| if(result_length) | |
| r.write(*new String(result_str, String::L_TAINTED)); | |
| } | } |
| } | } |