Skip to content

Commit 327fc7d

Browse files
committed
fix(klibc\kstdio): vsnprinf size_t can not exceed UINT32_MAX, don't use (rt_size_t -1)
1 parent 7125e7b commit 327fc7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/klibc/kstdio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RTM_EXPORT(rt_snprintf);
5151
*/
5252
int rt_vsprintf(char *buf, const char *format, va_list arg_ptr)
5353
{
54-
return rt_vsnprintf(buf, (rt_size_t) - 1, format, arg_ptr);
54+
return rt_vsnprintf(buf, INT32_MAX, format, arg_ptr);
5555
}
5656
RTM_EXPORT(rt_vsprintf);
5757

0 commit comments

Comments
 (0)