Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33944
Change subject: util/inteltool: Shrink buffer size ......................................................................
util/inteltool: Shrink buffer size
512 bytes is much too big for this buffer, which only needs to hold a path that will have a length of at most 20. The large buffer size also triggers a -Wformat-truncation warning with GCC since it is later printed into the smaller temp_string array, so shrink it down to something reasonable.
Change-Id: I6a136d1a739c782b368d5035db9bc25cf5b9599b Signed-off-by: Jacob Garber jgarber1@ualberta.ca --- M util/inteltool/cpu.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/33944/1
diff --git a/util/inteltool/cpu.c b/util/inteltool/cpu.c index ef2df3c..04870fc 100644 --- a/util/inteltool/cpu.c +++ b/util/inteltool/cpu.c @@ -110,7 +110,7 @@
static int open_and_seek(int cpu, unsigned long msr, int mode, int *fd) { - char dev[512]; + char dev[32]; char temp_string[50];
snprintf(dev, sizeof(dev), "/dev/cpu/%d/msr", cpu);