[achurch@achurch.org (Andrew Church)] glibc 2.2.2 strtok() segfault

Andreas Jaeger aj@suse.de
Wed Feb 21 02:55:00 GMT 2001


Andrew reported a bug in strtok.  I think the bug report is valid and
have added the testcase to glibc.  I had to use a new file since we
have static data in strtok and the other tests in tester.c initialize
the static data.

Andrew, can we commit this to glibc's testsuite?

Uli, ok to commit?
Andreas


2001-02-21  Andreas Jaeger  <aj@suse.de>

	* string/tst-strok.c: New testcase, reported by
	Andrew Church <achurch@achurch.org>.

============================================================
Index: string/tst-strtok.c
--- string/tst-strtok.c	created
+++ string/tst-strtok.c	Wed Feb 21 11:46:41 2001	1.1
@@ -0,0 +1,15 @@
+/* Testcase for strok reported by Andrew Church <achurch@achurch.org>.  */
+
+int
+main (void)
+{
+  char buf[1] = {0};
+
+  strtok (buf, " ");
+  strtok (NULL, " ");
+
+  return 0;
+}
+
+  
+      




More information about the Libc-alpha mailing list