aboutsummaryrefslogtreecommitdiff
path: root/string/bug-strpbrk1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-30 04:08:58 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-30 04:08:58 +0000
commit9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c (patch)
tree44df27f8867ae748b1923888bdd9bde08c65034e /string/bug-strpbrk1.c
parentf58580396d75a6d7429a909444ad8b70dd7dfff8 (diff)
downloadglibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.zip
glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.gz
glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.bz2
Update.
* string/bits/string2.h (strspn): Evaluate first argument if second is "". (strpbrk): Likewise. * sysdeps/i386/i486/bits/string.h: Likewise. * string/Makefile (tests): Add bug-strspn1 and bug-strpbrk1. * string/bug-strspn1.c: New file. * string/bug-strpbrk1.c: New file. Test cases by Joseph S. Myers <jsm28@cam.ac.uk>. * string/bits/string2.h (strncat): Terminate string correctly. * sysdeps/i386/i486/bits/string.h (strncat): Likewise. * string/Makefile (tests): Add bug-strncat1. * string/bug-strncat1.c: New file. Test case by Joseph S. Myers <jsm28@cam.ac.uk>. 2000-10-27 Ben Collins <bcollins@debian.org> * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'string/bug-strpbrk1.c')
-rw-r--r--string/bug-strpbrk1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/string/bug-strpbrk1.c b/string/bug-strpbrk1.c
new file mode 100644
index 0000000..7d5eef8
--- /dev/null
+++ b/string/bug-strpbrk1.c
@@ -0,0 +1,18 @@
+/* Test case by Joseph S. Myers <jsm28@cam.ac.uk>. */
+#define __USE_STRING_INLINES
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ const char *a = "abc";
+ const char *b = a;
+
+ strpbrk (b++, "");
+ if (b != a + 1)
+ exit (1);
+
+ exit (0);
+}