diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-10-05 09:31:15 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-10-05 09:31:15 -0700 |
commit | 76c33394c21a64a7c20047f72196b31dfdf233f0 (patch) | |
tree | 4efbda748b58633150a68c3fa5f775bd342d1dc7 /ldap/servers/slapd/dn.c | |
parent | 5f1cf3bd4564f76438bca187c9686adcfe123216 (diff) | |
download | ds-76c33394c21a64a7c20047f72196b31dfdf233f0.tar.gz ds-76c33394c21a64a7c20047f72196b31dfdf233f0.tar.xz ds-76c33394c21a64a7c20047f72196b31dfdf233f0.zip |
Bug 639289 - Adding a new CN entry with UpperCase UTF-8 Character
https://bugzilla.redhat.com/show_bug.cgi?id=639289
Description:
There was a bug in the utf8 uppe2Lower table:
Character İ (LATIN CAPITAL LETTER I WITH DOT ABOVE) did not map
to the corresponding LATIN SMALL LETTER DOTLESS I (2 bytes) but
to ascii 'i' (1 byte). The shortened DN tailed with a garbage
character and the entry was treated as an orphan entry which does
not belong to any suffix.
This patch fixes the mapping table mismatch as well as adds a code
to dn_ignore_case_to_end to force to NULL terminate the converted
string.
Diffstat (limited to 'ldap/servers/slapd/dn.c')
-rw-r--r-- | ldap/servers/slapd/dn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c index 54ddac10..7cf58c4e 100644 --- a/ldap/servers/slapd/dn.c +++ b/ldap/servers/slapd/dn.c @@ -1250,6 +1250,9 @@ dn_ignore_case_to_end( char *dn, char *end ) s += ssz, d += dsz) { slapi_utf8ToLower( s, d, &ssz, &dsz ); } + if (d) { + *d = '\0'; /* utf8ToLower result may be shorter than the original */ + } return( dn ); } |