[Bug locale/23711] New: wcsrtombs calls wcsnlen on input data which is not an array
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Sep 25 13:15:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23711
Bug ID: 23711
Summary: wcsrtombs calls wcsnlen on input data which is not an
array
Product: glibc
Version: 2.27
Status: NEW
Severity: normal
Priority: P2
Component: locale
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security-
If the destination pointer is not null, __wcsrtombs does this:
/* This code is based on the safe assumption that all internal
multi-byte encodings use the NUL byte only to mark the end
of the string. */
const wchar_t *srcend = *src + __wcsnlen (*src, len) + 1;
This is invalid because len can be much larger than the actual input data, and
calling __wcsnlen this way violates the precondition of the wcsnlen function:
the input must be an array.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list