mirror of
https://github.com/apache/httpd.git
synced 2025-08-03 16:33:59 +00:00
apr_expr: follow up to r1810605.
Not necessarily ASCII here.. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -365,8 +365,7 @@ static const char *ap_expr_regexec(const char *subject,
|
|||||||
if (list) {
|
if (list) {
|
||||||
char *tmp = apr_palloc(ctx->p, pos + len + 1);
|
char *tmp = apr_palloc(ctx->p, pos + len + 1);
|
||||||
memcpy(tmp, val, pos);
|
memcpy(tmp, val, pos);
|
||||||
memcpy(tmp + pos, str, len);
|
memcpy(tmp + pos, str, len + 1);
|
||||||
tmp[pos + len] = '\0';
|
|
||||||
APR_ARRAY_PUSH(list, const char*) = tmp;
|
APR_ARRAY_PUSH(list, const char*) = tmp;
|
||||||
}
|
}
|
||||||
else { /* regctx->type == 's' */
|
else { /* regctx->type == 's' */
|
||||||
@ -387,7 +386,7 @@ static const char *ap_expr_regexec(const char *subject,
|
|||||||
/* Skip this non-matching character (or CRLF) and restart
|
/* Skip this non-matching character (or CRLF) and restart
|
||||||
* another "normal" match (possibly empty) from there.
|
* 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;
|
val += 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user