Commit b8826e50 authored by Al Viro's avatar Al Viro

selftest for default_file_splice_read() infoleak

bug fixed in commit b9dc6f65 ("fix a fencepost error in pipe_advance()")
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7880b43b
...@@ -24,6 +24,7 @@ TARGETS += ptrace ...@@ -24,6 +24,7 @@ TARGETS += ptrace
TARGETS += seccomp TARGETS += seccomp
TARGETS += sigaltstack TARGETS += sigaltstack
TARGETS += size TARGETS += size
TARGETS += splice
TARGETS += static_keys TARGETS += static_keys
TARGETS += sync TARGETS += sync
TARGETS += sysctl TARGETS += sysctl
......
TEST_PROGS := default_file_splice_read.sh
EXTRA := default_file_splice_read
all: $(TEST_PROGS) $(EXTRA)
include ../lib.mk
clean:
rm -fr $(TEST_PROGS) $(EXTRA)
#define _GNU_SOURCE
#include <fcntl.h>
int main(int argc, char **argv)
{
splice(0, 0, 1, 0, 1<<30, 0);
return 0;
}
#!/bin/sh
n=`./default_file_splice_read </dev/null | wc -c`
test "$n" = 0 && exit 0
echo "default_file_splice_read broken: leaked $n"
exit 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment