xiaoxiang781216 commented on code in PR #2943:
URL: https://github.com/apache/nuttx-apps/pull/2943#discussion_r1914324480


##########
nshlib/nsh_parse.c:
##########
@@ -607,15 +607,22 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
     {
       FAR char *sh_argv[4];
       FAR char *sh_cmd = "sh";
-      char sh_arg2[LINE_MAX];
+      char *sh_arg2;

Review Comment:
   FAR



##########
nshlib/nsh_parse.c:
##########
@@ -607,15 +607,22 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
     {
       FAR char *sh_argv[4];
       FAR char *sh_cmd = "sh";
-      char sh_arg2[LINE_MAX];
+      char *sh_arg2;
 
       DEBUGASSERT(strncmp(argv[0], sh_cmd, 3) != 0);
 
+      sh_arg2 = lib_get_tempbuffer(LINE_MAX);
+      if (!sh_arg2)

Review Comment:
   ditto



##########
nshlib/nsh_parse.c:
##########
@@ -2703,11 +2712,19 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s 
*vtbl, FAR char *cmdline)
               goto dynlist_free;
             }
 
+          sh_arg2 = lib_get_tempbuffer(LINE_MAX);
+          if (!sh_arg2)

Review Comment:
   if (sh_arg2 == NULL)



##########
nshlib/nsh_parse.c:
##########
@@ -2685,7 +2694,7 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s *vtbl, 
FAR char *cmdline)
         {
           FAR char *arg;
           FAR char *sh_argv[4];
-          char sh_arg2[LINE_MAX];
+          char *sh_arg2;

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to