xref: /third_party/node/test/wasi/c/cant_dotdot.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/wasi/c/
11cb0ef41Sopenharmony_ci#include <assert.h>
21cb0ef41Sopenharmony_ci#include <errno.h>
31cb0ef41Sopenharmony_ci#include <stdio.h>
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciint main() {
61cb0ef41Sopenharmony_ci  FILE* file = fopen("/sandbox/../outside.txt", "r");
71cb0ef41Sopenharmony_ci  assert(file == NULL);
81cb0ef41Sopenharmony_ci  assert(errno == ENOTCAPABLE);
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci  return 0;
111cb0ef41Sopenharmony_ci}
12

Indexes created Thu Nov 07 10:32:03 CST 2024