1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

* string/test-strspn.c (do_test): Ensure zero termination.

* string/test-strpbrk.c (do_test): Likewise.
	* string/test-strncmp.c (stupid_strncmp): Use strnlen, not strlen.
	* string/test-strncpy.c (stupid_strncpy): Likewise.
	* string/test-stpncpy.c (stupid_stpncpy): Likewise.

2002-10-08  Roland McGrath  <roland@redhat.com>

	* string/test-string.h (test_init): Fill BUF1 and BUF2 with
	nonzero characters.

2002-09-22  H.J. Lu  <hjl@gnu.org>

	* sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed
	from PAGE_SHIFT.  Define if not defined.  Check MMAP2_PAGE_SHIFT
	only if __NR_mmap2 is defined.

	* sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ...
	* sysdeps/unix/sysv/linux/mmap64.c: ... here.
	* sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed.
	* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed,
This commit is contained in:
Roland McGrath
2002-11-09 00:36:21 +00:00
parent 2b49744308
commit 9372c95824
11 changed files with 104 additions and 189 deletions

View File

@ -97,7 +97,7 @@ do_test (size_t align, size_t pos, size_t len)
char *rej, *s;
align &= 7;
if (align + pos >= page_size || len > 240)
if (align + pos + 10 >= page_size || len > 240)
return;
rej = buf2 + (random () & 255);
@ -127,6 +127,12 @@ do_test (size_t align, size_t pos, size_t len)
}
}
s[pos] = rej[random () % (len + 1)];
if (s[pos])
{
for (i = pos + 1; i < pos + 10; ++i)
s[i] = random () & 255;
s[i] = '\0';
}
result = STRPBRK_RESULT (s, pos);
if (HP_TIMING_AVAIL)