1 // commit cef0f289f666b6c963bfd11537a6d80916ff889e 2014-06-19
2 // memmem should not access oob data
11 const unsigned char haystack
[] = { 0,0,0,0,0,0,0,1,2 };
12 const unsigned char needle
[] = { 0,0,0,0,0,0,0,1,3 };
13 unsigned char *p
= memmem(haystack
, 8, needle
, 8);
15 t_error("memmem(A,8,A,8) returned 0, want A\n");