You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2016/06/20 21:03:07 UTC

svn commit: r1749401 - /httpd/httpd/trunk/modules/filters/sed1.c

Author: jailletc36
Date: Mon Jun 20 21:03:07 2016
New Revision: 1749401

URL: http://svn.apache.org/viewvc?rev=1749401&view=rev
Log:
Fix 'x' command processing in mod_sed.

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 "}"

Modified:
    httpd/httpd/trunk/modules/filters/sed1.c

Modified: httpd/httpd/trunk/modules/filters/sed1.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/sed1.c?rev=1749401&r1=1749400&r2=1749401&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/sed1.c (original)
+++ httpd/httpd/trunk/modules/filters/sed1.c Mon Jun 20 21:03:07 2016
@@ -235,6 +235,7 @@ static void copy_to_genbuf(sed_eval_t *e
     if (eval->gsize < reqsize) {
         grow_gen_buffer(eval, reqsize, NULL);
     }
+    memcpy(eval->genbuf, sz, len + 1);
 }
 
 /*