fix malloc-brk-fail and memmem-oob tests
[libc-test.git] / src / regression / memmem-oob.c
blob2be928d17f35dd45ee78d4ef1f79884a890bfc55
1 // memmem should not access oob data
2 #ifndef _GNU_SOURCE
3 #define _GNU_SOURCE
4 #endif
5 #include <string.h>
6 #include "test.h"
8 int main(void)
10 char *p = memmem("abcde", 4, "cde", 3);
11 if (p)
12 t_error("memmem(abcde,4,cde,3) returned %s, want NULL\n", p);
13 return t_status;