summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-03-12 17:30:49 -0800
committerNoriko Hosoi <nhosoi@redhat.com>2010-03-16 13:33:40 -0700
commit23bf6060d3088f9a3f5f5fac1b18faa4bc8756c8 (patch)
treec42133f4583df38a5c4a08f37c7f0f53827ded4c
parent1ef0ec98b6c91471454647e5f613d26fa015c619 (diff)
downloadds-23bf6060d3088f9a3f5f5fac1b18faa4bc8756c8.tar.gz
ds-23bf6060d3088f9a3f5f5fac1b18faa4bc8756c8.tar.xz
ds-23bf6060d3088f9a3f5f5fac1b18faa4bc8756c8.zip
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.
-rw-r--r--ldap/servers/slapd/dn.c4
-rw-r--r--ldap/servers/slapd/util.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index 2e5ac001..f9c22589 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 71a2305b..d26b0b98 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;