From 27c4c2dd506849f549bffb594f31cbaf592bf1b4 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 17 Jan 2020 15:41:50 +0100 Subject: [PATCH] core: do not let frozen emulator import live files --- core/embed/unix/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/embed/unix/main.c b/core/embed/unix/main.c index 3de795cdf..1ceef024d 100644 --- a/core/embed/unix/main.c +++ b/core/embed/unix/main.c @@ -692,6 +692,9 @@ MP_NOINLINE int main_(int argc, char **argv) { return ret & 0xff; } +#ifdef TREZOR_EMULATOR_FROZEN +uint mp_import_stat(const char *path) { return MP_IMPORT_STAT_NO_EXIST; } +#else uint mp_import_stat(const char *path) { struct stat st; if (stat(path, &st) == 0) { @@ -703,6 +706,7 @@ uint mp_import_stat(const char *path) { } return MP_IMPORT_STAT_NO_EXIST; } +#endif void nlr_jump_fail(void *val) { printf("FATAL: uncaught NLR %p\n", val);