diff options
author | Roland McGrath <roland@gnu.org> | 2002-11-09 00:36:21 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-11-09 00:36:21 +0000 |
commit | 9372c9582451c4d40152769a0aeba35e58942b59 (patch) | |
tree | 1432bae1710df677dde7bdc95bb8057fbd6b3449 /string/test-strspn.c | |
parent | 2b49744308c65a95862b4ae197f27cec3ae8beaa (diff) | |
download | glibc-9372c9582451c4d40152769a0aeba35e58942b59.zip glibc-9372c9582451c4d40152769a0aeba35e58942b59.tar.gz glibc-9372c9582451c4d40152769a0aeba35e58942b59.tar.bz2 |
* 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,
Diffstat (limited to 'string/test-strspn.c')
-rw-r--r-- | string/test-strspn.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/string/test-strspn.c b/string/test-strspn.c index 4a64752..8701687 100644 --- a/string/test-strspn.c +++ b/string/test-strspn.c @@ -99,7 +99,7 @@ do_test (size_t align, size_t pos, size_t len) char *acc, *s; align &= 7; - if (align + pos >= page_size || len > 240 || ! len) + if (align + pos + 10 >= page_size || len > 240 || ! len) return; acc = buf2 + (random () & 255); @@ -120,6 +120,12 @@ do_test (size_t align, size_t pos, size_t len) s[pos] = random () & 255; if (strchr (acc, s[pos])) s[pos] = '\0'; + else + { + for (i = pos + 1; i < pos + 10; ++i) + s[i] = random () & 255; + s[i] = '\0'; + } if (HP_TIMING_AVAIL) printf ("Length %4zd, alignment %2zd, acc len %2zd:", pos, align, len); |