diff options
| author | Julien Voisin | 2023-11-16 15:46:10 +0000 |
|---|---|---|
| committer | GitHub | 2023-11-16 15:46:10 +0000 |
| commit | 7e6100d98005d1c125441915aaba1bfc6b5166fd (patch) | |
| tree | 2d0f2395dfd51d7b2810b7be3e549176b8a6c736 /tests/test_select_static.c | |
| parent | cfdcaf72ca60db28ad8a7240a5a09e99151cab24 (diff) | |
| parent | 52ec4848225a0e9f577272015ced52c45923d4ba (diff) | |
Add hardening for select()
Diffstat (limited to 'tests/test_select_static.c')
| -rw-r--r-- | tests/test_select_static.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_select_static.c b/tests/test_select_static.c new file mode 100644 index 0000000..c2abf7f --- /dev/null +++ b/tests/test_select_static.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <sys/select.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | #if !defined(__clang__) | ||
| 7 | fd_set rfds; | ||
| 8 | |||
| 9 | CHK_FAIL_START | ||
| 10 | select(1337, &rfds, NULL, NULL, NULL); | ||
| 11 | CHK_FAIL_END | ||
| 12 | |||
| 13 | puts((const char*)&rfds); | ||
| 14 | #endif | ||
| 15 | return ret; | ||
| 16 | } | ||
