This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18206] New: wcsncmp implementation does not behave the same as wcscmp and wmemcmp
- From: "stli at linux dot vnet.ibm.com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 07 Apr 2015 08:42:32 +0000
- Subject: [Bug libc/18206] New: wcsncmp implementation does not behave the same as wcscmp and wmemcmp
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18206
Bug ID: 18206
Summary: wcsncmp implementation does not behave the same as
wcscmp and wmemcmp
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: stli at linux dot vnet.ibm.com
CC: drepper.fsp at gmail dot com
the wcsncmp implementation does not behave the same as wcscmp
and wmemcmp due to using substraction instead of comparision:
wchar_t w0[] = { WCHAR_MIN, 0 };
wchar_t w1[] = { WCHAR_MAX, 0 };
wcscmp (w0, w1) = -1
wcsncmp (w0, w1, 2) = 1
wmemcmp (w0, w1, 2) = -1
--
You are receiving this mail because:
You are on the CC list for the bug.