httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1810702 - /httpd/httpd/trunk/server/util_expr_eval.c
Date Tue, 03 Oct 2017 09:23:32 GMT
Author: ylavic
Date: Tue Oct  3 09:23:32 2017
New Revision: 1810702

URL: http://svn.apache.org/viewvc?rev=1810702&view=rev
Log:
apr_expr: follow up to r1810605.

Not necessarily ASCII here..


Modified:
    httpd/httpd/trunk/server/util_expr_eval.c

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1810702&r1=1810701&r2=1810702&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Tue Oct  3 09:23:32 2017
@@ -365,8 +365,7 @@ static const char *ap_expr_regexec(const
             if (list) {
                 char *tmp = apr_palloc(ctx->p, pos + len + 1);
                 memcpy(tmp, val, pos);
-                memcpy(tmp + pos, str, len);
-                tmp[pos + len] = '\0';
+                memcpy(tmp + pos, str, len + 1);
                 APR_ARRAY_PUSH(list, const char*) = tmp;
             }
             else { /* regctx->type == 's' */
@@ -387,7 +386,7 @@ static const char *ap_expr_regexec(const
             /* Skip this non-matching character (or CRLF) and restart
              * another "normal" match (possibly empty) from there.
              */
-            if (val[0] == APR_ASCII_CR && val[1] == APR_ASCII_LF) {
+            if (val[0] == '\r' && val[1] == '\n') {
                 val += 2;
             }
             else {



Mime
View raw message