[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)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:34 +0000 (20:23 +0300)
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 516b73f2c98442484d1650ea63c9e725233e45d7..a1b22d1d9fcee7b9d850c65d62592c1dd11d1d25 100644 (file)
@@ -612,7 +612,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)";