[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Bug in utf-8.c (ITS#860)
Full_Name: David Steck
Version: devel
OS: NT
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (137.65.133.65)
The 0x400000 should have an extra 0.
5-byte UTF-8 sequences are not generated correctly.
Index: utf-8.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/utf-8.c,v
retrieving revision 1.16
diff -u -r1.16 utf-8.c
--- utf-8.c 2000/10/23 16:04:45 1.16
+++ utf-8.c 2000/10/27 18:09:24
@@ -161,7 +161,7 @@
p[len++] = 0x80 | ( (c >> 6) & 0x3f );
p[len++] = 0x80 | ( c & 0x3f );
- } else if( c < 0x400000 ) {
+ } else if( c < 0x4000000 ) {
p[len++] = 0xf8 | ( c >> 24 );
p[len++] = 0x80 | ( (c >> 18) & 0x3f );
p[len++] = 0x80 | ( (c >> 12) & 0x3f );