Fix Error: vi.c:888:57: error: format string is not a string literal (potentially insecure)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
bb24794fcb
commit
d706510064
@ -885,7 +885,7 @@ static void vi_printf(FAR struct vi_s *vi, FAR const char *prefix,
|
||||
|
||||
/* Expand the prefix message in the scratch buffer */
|
||||
|
||||
len = prefix ? snprintf(vi->scratch, SCRATCH_BUFSIZE, prefix) : 0;
|
||||
len = prefix ? snprintf(vi->scratch, SCRATCH_BUFSIZE, "%s", prefix) : 0;
|
||||
|
||||
va_start(ap, fmt);
|
||||
len += vsnprintf(vi->scratch + len, SCRATCH_BUFSIZE - len, fmt, ap);
|
||||
|
Loading…
Reference in New Issue
Block a user