diff options
Diffstat (limited to 'test/wasi/c/cant_dotdot.c')
-rw-r--r-- | test/wasi/c/cant_dotdot.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/wasi/c/cant_dotdot.c b/test/wasi/c/cant_dotdot.c new file mode 100644 index 0000000000..e2722062cd --- /dev/null +++ b/test/wasi/c/cant_dotdot.c @@ -0,0 +1,11 @@ +#include <assert.h> +#include <errno.h> +#include <stdio.h> + +int main() { + FILE* file = fopen("/sandbox/../outside.txt", "r"); + assert(file == NULL); + assert(errno == ENOTCAPABLE); + + return 0; +} |