Bug 1109 - name_mangle(): Do NOT use toupper(3) for dos charset (multibyte) string
name_mangle(): Do NOT use toupper(3) for dos charset (multibyte) string
Product: Samba 3.0
Classification: Unclassified
Component: Extended Characters
Other other
: P3 normal
: none
Assigned To: Alexander Bokovoy
Depends on:
  Show dependency treegraph
Reported: 2004-02-20 02:06 UTC by SATOH Fumiyasu
Modified: 2005-08-24 10:24 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description SATOH Fumiyasu 2004-02-20 02:06:58 UTC
In source/libsmb/nmblib.c, name_mangle() uses toupper(3) against a NetBIOS
name string. If a string has multibyte characters encoded in CP932 (dos cahrset
name for Windows Japanese Edition) and has some specific CP932 words
(e.g. "\x8A\x6A", means "Core" in Japanese/CP932), words in the string is changed
into another word (e.g. "\x8A\x4A", means "Open" in Japanese/CP932).

Do not use toupper(3) for strings which can have multibyte characters.
Comment 1 SATOH Fumiyasu 2004-03-17 19:41:31 UTC
A proposed patch is included in a patch attached in Bug 784.
Comment 2 Gerald (Jerry) Carter 2004-04-22 20:23:39 UTC
784 is fixed so I guess this one is as well.  Closing.
Comment 3 Gerald (Jerry) Carter 2005-08-24 10:24:47 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.