projects
/
libc-test
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
2be928d17f35dd45ee78d4ef1f79884a890bfc55
[libc-test]
/
src
/
regression
/
memmem-oob.c
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"
7
8
int main(void)
9
{
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;
14
}