未验证 提交 7129694f 编写于 作者: D David Lin 提交者: GitHub

[finsh]Fixed a bug may cause stackover flow

add code:
if (line_buf == RT_NULL) return -RT_ENOMEM;
上级 b2e30a7e
......@@ -101,6 +101,7 @@ int msh_exec_script(const char *cmd_line, int size)
int length;
line_buf = (char *) rt_malloc(RT_CONSOLEBUF_SIZE);
if (line_buf == RT_NULL) return -RT_ENOMEM;
/* read line by line and then exec it */
do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册