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


##########
system/nxplayer/nxplayer_main.c:
##########
@@ -317,10 +317,11 @@ static int nxplayer_cmd_playraw(FAR struct nxplayer_s 
*pplayer, char *parg)
   int bpsamp = 0;
   int samprate = 0;
   int chmap = 0;
-  char filename[128];
+  char format[32];
+  char filename[PATH_MAX];
 
-  sscanf(parg, "%s %d %d %d %d", filename, &channels, &bpsamp,
-                                 &samprate, &chmap);
+  snprintf(format, sizeof(format), "%%%ds %%d %%d %%d %%d", PATH_MAX - 1);

Review Comment:
   why not use PATH_MAX directly



-- 
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