This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.2.11
in repository 389-ds-base.
commit 2728983916cdfc16e460de348694ee84594f678c
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue May 8 11:05:50 2018 -0400
CVE-2018-1089 - Crash from long search filter
---
ldap/servers/slapd/util.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 8c0b7ee..6aed9b9 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -148,6 +148,11 @@ do_escape_string (
break;
}
do {
+ if (bufSpace < 4) {
+ memcpy(bufNext, "..", 2);
+ bufNext += 2;
+ goto bail;
+ }
if (esc == UTIL_ESCAPE_BACKSLASH) {
/* *s is '\\' */
/* If *(s+1) and *(s+2) are both hex digits,
@@ -162,11 +167,6 @@ do_escape_string (
}
} else { /* UTIL_ESCAPE_HEX */
*bufNext++ = '\\'; --bufSpace;
- if (bufSpace < 3) {
- memcpy(bufNext, "..", 2);
- bufNext += 2;
- goto bail;
- }
PR_snprintf(bufNext, 3, "%02x", *(unsigned char*)s);
bufNext += 2; bufSpace -= 2;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.