[RAMEN9610-19586]vsprintf: fix data type of variable in string_nocheck()
authorYoungmin Nam <youngmin.nam@samsung.com>
Mon, 10 Jun 2019 08:15:37 +0000 (17:15 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Mon, 9 Sep 2019 11:05:04 +0000 (20:05 +0900)
This patch fixes data type of precision with int.
The precision is declared as signed int in struct printf_spec.

Change-Id: Iaa6e2d074ed9d4ca191a8366489a394d79b62ac1
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Kim Gunho <gunho.kim@samsung.com>
lib/vsprintf.c

index 4a990f3fd345820766a49a34e29c499e243af7b4..0fe1a9c91d18031d3ece5a175d8e8fe3fc56a934 100644 (file)
@@ -584,7 +584,7 @@ static noinline_for_stack
 char *string(char *buf, char *end, const char *s, struct printf_spec spec)
 {
        int len = 0;
-       size_t lim = spec.precision;
+       int lim = spec.precision;
 
        if ((unsigned long)s < PAGE_SIZE)
                s = "(null)";