projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd3933c
)
tools/power turbostat: fix possible sprintf buffer overflow
author
Len Brown
<len.brown@intel.com>
Fri, 8 Dec 2017 22:38:17 +0000
(17:38 -0500)
committer
Len Brown
<len.brown@intel.com>
Fri, 1 Jun 2018 21:14:56 +0000
(17:14 -0400)
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c
patch
|
blob
|
history
diff --git
a/tools/power/x86/turbostat/turbostat.c
b/tools/power/x86/turbostat/turbostat.c
index 32f3a33a985095c0c157de8fdc7bae603fdeb923..59742600b7eb06f0ca069dd46c65126c88a277fc 100644
(file)
--- a/
tools/power/x86/turbostat/turbostat.c
+++ b/
tools/power/x86/turbostat/turbostat.c
@@
-1529,7
+1529,7
@@
int get_mp(int cpu, struct msr_counter *mp, unsigned long long *counterp)
if (get_msr(cpu, mp->msr_num, counterp))
return -1;
} else {
- char path[128];
+ char path[128
+ PATH_BYTES
];
if (mp->flags & SYSFS_PERCPU) {
sprintf(path, "/sys/devices/system/cpu/cpu%d/%s",