Unicode validation range

Thiago Macieira thiago at kde.org
Sun Feb 7 14:24:08 PST 2010


Em Sábado 6. Fevereiro 2010, às 18.28.54, Thiago Macieira escreveu:
> Hello
> 
> dbus/dbus-string.c contains this code:
> 
> #define UNICODE_VALID(Char)                   \
>     ((Char) < 0x110000 &&                     \
>      (((Char) & 0xFFFFF800) != 0xD800) &&     \
>      ((Char) < 0xFDD0 || (Char) > 0xFDEF) &&  \
>      ((Char) & 0xFFFF) != 0xFFFF)
> 
> I'm trying to understand why we reject the FDD0-FDEF range. This has been
> causing problems in some applications leading to even remote-crashable (app
> receives UTF-8 string from network, app sends such string via D-Bus, D-Bus
> disconnects unexepectedly, crash).
> 
> I'm proposing we either:
> 
> 1) remove the unnecessary checks and allow those characters in

> I'd rather we did 1.

Here's the patch to do that.

I'd like to apply it as soon as possible. I'd recommend that distributions 
apply it to their 1.2.20 releases (since I don't have time to create a 1.2.22, 
I won't force them).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-be-so-severe-with-UTF-8-text-allow-non-charact.patch
Type: text/x-patch
Size: 1280 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20100207/d6d8d079/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20100207/d6d8d079/attachment.pgp 


More information about the dbus mailing list