]> granicus.if.org Git - php/commitdiff
Fix Bug #54727, a re-incarnation of #26862
authorMichael Wallner <mike@php.net>
Mon, 23 May 2011 10:42:00 +0000 (10:42 +0000)
committerMichael Wallner <mike@php.net>
Mon, 23 May 2011 10:42:00 +0000 (10:42 +0000)
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re

index 0618138f15e1176383d79b188e0e7e903044fafd..f9c017ff93b77905258f73a0581cea40ca16c2eb 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon May 31 11:07:50 2010 */
+/* Generated by re2c 0.13.5 on Mon May 23 12:29:55 2011 */
 #line 1 "ext/standard/url_scanner_ex.re"
 /*
   +----------------------------------------------------------------------+
@@ -1012,7 +1012,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
                        ctx->result.len = 0;
                        smart_str_free(&ctx->buf);
                } else {
-                       *handled_output = NULL;
+                       *handled_output = estrndup(output, *handled_output_len = output_len);
                }
        } else {
                *handled_output = NULL;
index 5cc16c7ece07129d5f310134528f67bf5cdb3cf8..7994925b1c08049a9b7e3d3aa3119f3adf2f47c3 100644 (file)
@@ -450,7 +450,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
                        ctx->result.len = 0;
                        smart_str_free(&ctx->buf);
                } else {
-                       *handled_output = NULL;
+                       *handled_output = estrndup(output, *handled_output_len = output_len);
                }
        } else {
                *handled_output = NULL;