functional: add mntent test
[libc-test.git] / src / regression / memmem-oob.c
blob5249284b5ca8f7522c62938fefbaa25bbb80f065
1 // commit 6fbdeff0e51f6afc38fbb1476a4db81322779da4 2014-04-09
2 // memmem should not access oob data
3 #ifndef _GNU_SOURCE
4 #define _GNU_SOURCE
5 #endif
6 #include <string.h>
7 #include "test.h"
9 int main(void)
11 char *p = memmem("abcde", 4, "cde", 3);
12 if (p)
13 t_error("memmem(abcde,4,cde,3) returned %s, want NULL\n", p);
14 return t_status;