svn commit: r313513 - stable/10/contrib/netbsd-tests/lib/libc/string
Ngie Cooper
ngie at FreeBSD.org
Fri Feb 10 02:48:25 UTC 2017
Author: ngie
Date: Fri Feb 10 02:48:24 2017
New Revision: 313513
URL: https://svnweb.freebsd.org/changeset/base/313513
Log:
MFC r306784:
r306784 (by emaste):
Add test for a musl libc memmem bug
With a short needle (aka little) musl's memmem could read past the end
of the haystack (aka big). This was fixed in musl commit c718f9f.
Modified:
stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Fri Feb 10 02:47:32 2017 (r313512)
+++ stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Fri Feb 10 02:48:24 2017 (r313513)
@@ -51,6 +51,8 @@ char p6[] = "9";
int lp6 = 1;
char p7[] = "654";
int lp7 = 3;
+char p8[] = "89abc";
+int lp8 = 5;
char b0[] = "";
int lb0 = 0;
@@ -94,6 +96,7 @@ ATF_TC_BODY(memmem_basic, tc)
expect(memmem(b2, lb2, p4, lp4) == NULL);
expect(memmem(b2, lb2, p7, lp7) == NULL);
+ expect(memmem(b2, lb2, p8, lp8) == NULL);
}
ATF_TP_ADD_TCS(tp)
More information about the svn-src-all
mailing list