Bläddra i källkod

_sys_command_string返回值错误,no support时cmd为随机数据,可能导致c库初始化时在此函数返回处死循环或跑飞.

liruncong 7 år sedan
förälder
incheckning
ba20a00e19
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      components/libc/compilers/armlibc/stubs.c

+ 1 - 1
components/libc/compilers/armlibc/stubs.c

@@ -249,7 +249,7 @@ int _sys_tmpnam(char *name, int fileno, unsigned maxlength)
 char *_sys_command_string(char *cmd, int len)
 char *_sys_command_string(char *cmd, int len)
 {
 {
     /* no support */
     /* no support */
-    return cmd;
+    return RT_NULL;
 }
 }
 
 
 /* This function writes a character to the console. */
 /* This function writes a character to the console. */