[Bug stdio/24563] New: vfprintf makes incorrect assumption about wchar_t character count

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Thu May 16 10:12:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=24563

            Bug ID: 24563
           Summary: vfprintf makes incorrect assumption about wchar_t
                    character count
           Product: glibc
           Version: 2.30
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
            Blocks: 24562
  Target Milestone: ---
             Flags: security-

This assumption is not true for exotic character sets as TSCII:

            /* Allocate dynamically an array which definitely is long         \
               enough for the wide character version.  Each byte in the       \
               multi-byte string can produce at most one wide character.  */  \
            if (__glibc_unlikely (len > SIZE_MAX / sizeof (wchar_t)))         \
              {                                                               \
                __set_errno (EOVERFLOW);                                      \
                done = -1;                                                    \
                goto all_done;                                                \
              }                                                               \

See Unicode Technical Note 15 <https://www.unicode.org/notes/tn15/> for the
background.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=24562
[Bug 24562] __fxprintf makes incorrect assumption about multibyte string
conversion
-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list