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
cd2e0532
Commit
cd2e0532
authored
Mar 22, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix the overflow check in read_changes_apc().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad9fb96e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
file.c
dlls/ntdll/file.c
+4
-3
No files found.
dlls/ntdll/file.c
View file @
cd2e0532
...
...
@@ -1768,16 +1768,17 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
while
(
size
&&
left
>=
sizeof
(
*
pfni
))
{
DWORD
len
=
(
left
-
offsetof
(
FILE_NOTIFY_INFORMATION
,
FileName
))
/
sizeof
(
WCHAR
);
/* convert to an NT style path */
for
(
i
=
0
;
i
<
event
->
len
;
i
++
)
if
(
event
->
name
[
i
]
==
'/'
)
event
->
name
[
i
]
=
'\\'
;
pfni
->
Action
=
event
->
action
;
pfni
->
FileNameLength
=
ntdll_umbstowcs
(
event
->
name
,
event
->
len
,
pfni
->
FileName
,
(
left
-
offsetof
(
FILE_NOTIFY_INFORMATION
,
FileName
))
/
sizeof
(
WCHAR
));
pfni
->
FileNameLength
=
ntdll_umbstowcs
(
event
->
name
,
event
->
len
,
pfni
->
FileName
,
len
);
last_entry_offset
=
&
pfni
->
NextEntryOffset
;
if
(
pfni
->
FileNameLength
==
-
1
||
pfni
->
FileNameLength
==
-
2
)
break
;
if
(
pfni
->
FileNameLength
==
len
)
break
;
i
=
offsetof
(
FILE_NOTIFY_INFORMATION
,
FileName
[
pfni
->
FileNameLength
]);
pfni
->
FileNameLength
*=
sizeof
(
WCHAR
);
...
...
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