-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftest for default_file_splice_read() infoleak
bug fixed in commit b9dc6f6 ("fix a fencepost error in pipe_advance()") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
- Loading branch information
Al Viro
committed
Feb 19, 2017
1 parent
7880b43
commit b8826e5
Showing
4 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#define _GNU_SOURCE | ||
#include <fcntl.h> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
splice(0, 0, 1, 0, 1<<30, 0); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/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 |