Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1a6deb1c
Commit
1a6deb1c
authored
Dec 02, 2023
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Dec 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tasklist: Fix a possible buffer overrun (Coverity).
process_entry->szExeFile has length of MAX_PATH but info->image_name only has 32.
parent
eeb1826c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tasklist.c
programs/tasklist/tasklist.c
+1
-1
No files found.
programs/tasklist/tasklist.c
View file @
1a6deb1c
...
@@ -176,7 +176,7 @@ static BOOL tasklist_get_process_info(const PROCESSENTRY32W *process_entry, stru
...
@@ -176,7 +176,7 @@ static BOOL tasklist_get_process_info(const PROCESSENTRY32W *process_entry, stru
info
->
pid_value
=
process_entry
->
th32ProcessID
;
info
->
pid_value
=
process_entry
->
th32ProcessID
;
info
->
memory_usage_value
=
memory_counters
.
WorkingSetSize
/
1024
;
info
->
memory_usage_value
=
memory_counters
.
WorkingSetSize
/
1024
;
info
->
session_id_value
=
session_id
;
info
->
session_id_value
=
session_id
;
wcscpy
(
info
->
image_name
,
process_entry
->
szExeFile
);
lstrcpynW
(
info
->
image_name
,
process_entry
->
szExeFile
,
ARRAY_SIZE
(
info
->
image_name
)
);
swprintf
(
info
->
pid
,
ARRAY_SIZE
(
info
->
pid
),
L"%u"
,
process_entry
->
th32ProcessID
);
swprintf
(
info
->
pid
,
ARRAY_SIZE
(
info
->
pid
),
L"%u"
,
process_entry
->
th32ProcessID
);
wcscpy
(
info
->
session_name
,
session_id
==
0
?
L"Services"
:
L"Console"
);
wcscpy
(
info
->
session_name
,
session_id
==
0
?
L"Services"
:
L"Console"
);
swprintf
(
info
->
session_number
,
ARRAY_SIZE
(
info
->
session_number
),
L"%u"
,
session_id
);
swprintf
(
info
->
session_number
,
ARRAY_SIZE
(
info
->
session_number
),
L"%u"
,
session_id
);
...
...
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