Replace all sprintf with snprintf

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-03-05 23:55:15 +08:00
committed by Petro Karashchenko
parent 134b8b538f
commit 7c37421266
48 changed files with 237 additions and 174 deletions

View File

@@ -283,7 +283,7 @@ int nsh_setvar(FAR struct nsh_vtbl_s *vtbl, FAR const char *name,
/* Now, put the new name=value string into the NSH variable buffer */
sprintf(pair, "%s=%s", name, value);
snprintf(pair, varlen, "%s=%s", name, value);
return OK;
}
#endif