Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc/locale



Module Name:    src
Committed By:   tnozaki
Date:           Sun Mar 28 14:05:09 UTC 2010

Modified Files:
        src/lib/libc/locale: setlocale32.c

Log Message:
avoid mbrtowc/wcrtomb buffer overrun when CPUARCH=hppa and MB_CUR_MAX > 6.
it is not usual case(merely used such mutibyte locale, eg. ja_JP.ISO-2022-JP).

[background]
before merging minoura-xpg4dl branch(2001), we argued and decided to increase
MB_LEN_MAX 1 -> 32 all CPUARCH(*but* we forgot to change it MD to MI).

without knowing that NetBSD/hp700(mergeing -current 2002) incorrectly set
MB_LEN_MAX=6 (maybe this value taken from FreeBSD). but our setlocale(3)
assumes __mb_len_max_runtime as 32, so that mbrtowc/wcrtomb may overrun.

we have to increase hppa's MB_LEN_MAX upto 32, and change it MD to MI
next libc major bump(scheduled next release 6.0).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/setlocale32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index