repo.or.cz
/
libc-test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix malloc-brk-fail and memmem-oob tests
[libc-test.git]
/
src
/
regression
/
memmem-oob.c
blob
2be928d17f35dd45ee78d4ef1f79884a890bfc55
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
}