public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/27655] New: Wrong size calculation in string/test-strnlen.c
@ 2021-03-27 16:02 hjl.tools at gmail dot com
2021-03-27 18:16 ` [Bug string/27655] " hjl.tools at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-27 16:02 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27655
Bug ID: 27655
Summary: Wrong size calculation in string/test-strnlen.c
Product: glibc
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: string
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
string/test-strnlen.c has
static void
do_page_tests (void)
{
size_t i, exp_len, start_offset, offset;
/* Calculate the null character offset. */
size_t last_offset = (page_size / sizeof (CHAR)) - 1;
CHAR *s = (CHAR *) buf2;
memset (s, 65, (last_offset - 1));
^^^^^^^^^^^^^^^ Wrong size when size of CHAR > 1.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug string/27655] Wrong size calculation in string/test-strnlen.c
2021-03-27 16:02 [Bug string/27655] New: Wrong size calculation in string/test-strnlen.c hjl.tools at gmail dot com
@ 2021-03-27 18:16 ` hjl.tools at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-27 18:16 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27655
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |2.34
Resolution|--- |FIXED
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.34 by
commit 86859b7e58d8670b186c5209ba25f0fbd6612fb7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat Mar 27 09:15:00 2021 -0700
test-strnlen.c: Initialize wchar_t string with wmemset [BZ #27655]
Use wmemset to initialize wchar_t string.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-27 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 16:02 [Bug string/27655] New: Wrong size calculation in string/test-strnlen.c hjl.tools at gmail dot com
2021-03-27 18:16 ` [Bug string/27655] " hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).