From b314dd49a28a38997aa8f472d02f0631a830d37a Mon Sep 17 00:00:00 2001 From: Youngmin Nam Date: Mon, 10 Jun 2019 16:47:07 +0900 Subject: vsprintf: fix data type of variable in string_nocheck() This patch fixes data type of precision with int. The precision is declared as signed int in struct printf_spec. Link: http://lkml.kernel.org/r/040301d51f60$b4959100$1dc0b300$@samsung.com To: To: To: To: Signed-off-by: Youngmin Nam Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/vsprintf.c') diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 2f003cfe340e..25b8f4f040c0 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -598,7 +598,7 @@ static char *string_nocheck(char *buf, char *end, const char *s, struct printf_spec spec) { int len = 0; - size_t lim = spec.precision; + int lim = spec.precision; while (lim--) { char c = *s++; -- cgit v1.2.3