diff --git a/elks/fs/msdos/namei.c b/elks/fs/msdos/namei.c index 70bfee604..eff871010 100644 --- a/elks/fs/msdos/namei.c +++ b/elks/fs/msdos/namei.c @@ -95,9 +95,11 @@ static int FATPROC msdos_find_long(struct inode *dir, const char *name, int len, int i, entry_len, res; off_t dirpos, pos = 0; int nocase = 0; - ASYNCIO_REENTRANT char entry_name[14]; - ASYNCIO_REENTRANT char msdos_name[14]; + ASYNCIO_REENTRANT char entry_name[MAXNAMLEN]; /* FIXME large stack usage */ + ASYNCIO_REENTRANT char msdos_name[MAXNAMLEN]; /* FIXME large stack usage */ + if (len > MAXNAMLEN) + return -ENOENT; for (i=0; i= MAX_IDENT_LEN) + if (strlen(stackGetStr()) > MAX_PATH_LEN-1) return ERROR_BAD_PARAMETER; strcpy(fileName, stackPopStr()); #if DISK_FUNCTIONS diff --git a/elkscmd/basic/snakcga.bas b/elkscmd/basic/snakecga.bas similarity index 100% rename from elkscmd/basic/snakcga.bas rename to elkscmd/basic/snakecga.bas