diff --git a/cores/esp8266/FS.cpp b/cores/esp8266/FS.cpp index 55bae8f5c5..8241083ab0 100644 --- a/cores/esp8266/FS.cpp +++ b/cores/esp8266/FS.cpp @@ -196,6 +196,7 @@ File FS::open(const char* path, const char* mode) { DEBUGV("FS::open: invalid mode `%s`\r\n", mode); return File(); } + if (strlen(path) > 31) return File(); return File(_impl->open(path, om, am)); }