diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/msh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 4adb05c918..c7e7a27dcc 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -640,6 +640,11 @@ void msh_auto_complete_path(char *path, rt_size_t path_size) return; } + if (rt_strlen(path) >= DFS_PATH_MAX) + { + return; + } + full_path = (char *)rt_malloc(DFS_PATH_MAX); if (full_path == RT_NULL) return; /* out of memory */ |
