• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
8 
main(void)9 int main(void)
10 {
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;
15 }
16