Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
46c27978
Commit
46c27978
authored
Dec 08, 2017
by
Len Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/power turbostat: fix possible sprintf buffer overflow
Signed-off-by:
Len Brown
<
len.brown@intel.com
>
parent
fd3933ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/power/x86/turbostat/turbostat.c
tools/power/x86/turbostat/turbostat.c
+1
-1
No files found.
tools/power/x86/turbostat/turbostat.c
View file @
46c27978
...
@@ -1529,7 +1529,7 @@ int get_mp(int cpu, struct msr_counter *mp, unsigned long long *counterp)
...
@@ -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
))
if
(
get_msr
(
cpu
,
mp
->
msr_num
,
counterp
))
return
-
1
;
return
-
1
;
}
else
{
}
else
{
char
path
[
128
];
char
path
[
128
+
PATH_BYTES
];
if
(
mp
->
flags
&
SYSFS_PERCPU
)
{
if
(
mp
->
flags
&
SYSFS_PERCPU
)
{
sprintf
(
path
,
"/sys/devices/system/cpu/cpu%d/%s"
,
sprintf
(
path
,
"/sys/devices/system/cpu/cpu%d/%s"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment