]> granicus.if.org Git - apache/commitdiff
Fix 'x' command processing in mod_sed.
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 20 Jun 2016 21:03:07 +0000 (21:03 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 20 Jun 2016 21:03:07 +0000 (21:03 +0000)
This has been tested using a slighly modified example taken from:
    https://blogs.oracle.com/basant/entry/using_mod_sed_to_filter
(OutputSed "s/.\*//"             has been changed in                OutputSed "s/.*//")

OutputSed "/Sunday/ {"
OutputSed "h"
OutputSed "s/.*//"
OutputSed "N"
OutputSed "s/\^.//"
OutputSed     "/Monday/ {"
OutputSed         "x"
OutputSed         "s/Sunday/Monday/"
OutputSed         "x"
OutputSed         "s/Monday/Tuesday/"
OutputSed         "H"
OutputSed         "g"
OutputSed     "}"
OutputSed "}"

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1749401 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/sed1.c

index 739e1ce9c1181f4a0301a5c9e16dc0e807bd0e4b..8f383b8b0f4f84f872dab51b7bbee45bc7a89e18 100644 (file)
@@ -235,6 +235,7 @@ static void copy_to_genbuf(sed_eval_t *eval, const char* sz)
     if (eval->gsize < reqsize) {
         grow_gen_buffer(eval, reqsize, NULL);
     }
+    memcpy(eval->genbuf, sz, len + 1);
 }
 
 /*