util: kernel: Fix STATIC_OVERFLOW issue 54/271754/2
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 28 Feb 2022 05:41:36 +0000 (14:41 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 28 Feb 2022 05:17:57 +0000 (05:17 +0000)
Change-Id: Ic8118a695865913f06da029a47278cccfd266c09
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/util/kernel.c

index 6e9fb36..a23c40e 100644 (file)
@@ -61,7 +61,7 @@ static int __get_cpu_stat(FILE *fp, struct cpu_stat *data)
        if (!fp || !data)
                return -EINVAL;
 
-       ret = fscanf(fp, "%s %"PRId64" %"PRId64" %"PRId64" %"PRId64" \
+       ret = fscanf(fp, "%7s %"PRId64" %"PRId64" %"PRId64" %"PRId64" \
                                %"PRId64" %"PRId64" %"PRId64" %*s %*s %*s",
                data->name,
                &data->user,