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
functional: add mntent test
[libc-test.git]
/
src
/
regression
/
memmem-oob.c
blob
5249284b5ca8f7522c62938fefbaa25bbb80f065
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
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
}