ldap/servers/slapd/dn.c | 4 +--- ldap/servers/slapd/util.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
New commits: commit 81de991c5b52c7f3c02aa6215227aee2408f24bc Author: Noriko Hosoi nhosoi@redhat.com Date: Fri Mar 12 17:30:49 2010 -0800
573060 - DN normalizer: ESC HEX HEX is not normalized (
https://bugzilla.redhat.com/show_bug.cgi?id=573060
Description: there were 2 bugs handling ESC HEX HEXT format. It was ignoring non-ASCII characters. Now, they are covered.
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c index 3ab9327..73eeda1 100644 --- a/ldap/servers/slapd/dn.c +++ b/ldap/servers/slapd/dn.c @@ -361,9 +361,7 @@ substr_dn_normalize( char *dn, char *end ) gotesc = 1; if ( s+2 < end ) { int n = hexchar2int( s[1] ); - /* If 8th bit is on, the char is not ASCII (not UTF-8). - * Thus, not UTF-8 */ - if ( n >= 0 && n < 8 ) { + if ( n >= 0 && n < 16 ) { int n2 = hexchar2int( s[2] ); if ( n2 >= 0 ) { n = (n << 4) + n2; diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c index 71a2305..d26b0b9 100644 --- a/ldap/servers/slapd/util.c +++ b/ldap/servers/slapd/util.c @@ -217,9 +217,7 @@ strcpy_unescape_value( char *d, const char *s ) gotesc = 1; if ( s+2 < end ) { int n = hexchar2int( s[1] ); - /* If 8th bit is on, the char is not ASCII (not UTF-8). - * Thus, not UTF-8 */ - if ( n >= 0 && n < 8 ) { + if ( n >= 0 && n < 16 ) { int n2 = hexchar2int( s[2] ); if ( n2 >= 0 ) { n = (n << 4) + n2;