projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d56c079
)
fixes found from additional tests in 3.1
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 30 Dec 2015 16:44:25 +0000
(11:44 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Wed, 30 Dec 2015 16:44:56 +0000
(11:44 -0500)
src/main/evaluate.c
patch
|
blob
|
history
diff --git
a/src/main/evaluate.c
b/src/main/evaluate.c
index
c00a92a
..
667d0d9
100644
(file)
--- a/
src/main/evaluate.c
+++ b/
src/main/evaluate.c
@@
-366,10
+366,12
@@
static size_t regex_escape(UNUSED REQUEST *request, char *out, size_t outlen, ch
if (outlen < 3) goto done;
*(p++) = '\\';
+ outlen--;
/* FALL-THROUGH */
default:
*(p++) = *(in++);
+ outlen--;
break;
}
}
@@
-452,7
+454,8
@@
do {\
#ifdef HAVE_REGEX
if (map->op == T_OP_REG_EQ) {
cast_type = PW_TYPE_STRING;
- escape = regex_escape;
+
+ if (map->rhs->type == TMPL_TYPE_XLAT_STRUCT) escape = regex_escape;
}
else
#endif