summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/lscpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index ef5941088..c272dc238 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -621,7 +621,7 @@ read_hypervisor_powerpc(struct lscpu_desc *desc)
fd = path_fopen("r", 0, _PATH_PROC_DEVICETREE "/ibm,partition-name");
if (fd) {
char buf[256];
- if (fscanf(fd, "%s", buf) == 1 && !strcmp(buf, "full"))
+ if (fscanf(fd, "%255s", buf) == 1 && !strcmp(buf, "full"))
desc->virtype = VIRT_NONE;
fclose(fd);
}
@@ -757,7 +757,7 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod)
if (fd) {
char buf[256];
- if (fscanf(fd, "%s", buf) == 1 &&
+ if (fscanf(fd, "%255s", buf) == 1 &&
!strcmp(buf, "control_d"))
dom0 = 1;
fclose(fd);