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
64aec5d8
Commit
64aec5d8
authored
Mar 29, 2016
by
Bernhard Übelacker
Committed by
Alexandre Julliard
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Make IoAllocateIrp not crash on negative values.
Signed-off-by:
Bernhard Übelacker
<
bernhardu@vr-web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
376daa91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+7
-2
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
64aec5d8
...
...
@@ -592,15 +592,20 @@ PIRP WINAPI IoAllocateIrp( CCHAR stack_size, BOOLEAN charge_quota )
{
SIZE_T
size
;
PIRP
irp
;
CCHAR
loc_count
=
stack_size
;
TRACE
(
"%d, %d
\n
"
,
stack_size
,
charge_quota
);
size
=
sizeof
(
IRP
)
+
stack_size
*
sizeof
(
IO_STACK_LOCATION
);
if
(
loc_count
<
8
&&
loc_count
!=
1
)
loc_count
=
8
;
size
=
sizeof
(
IRP
)
+
loc_count
*
sizeof
(
IO_STACK_LOCATION
);
irp
=
ExAllocatePool
(
NonPagedPool
,
size
);
if
(
irp
==
NULL
)
return
NULL
;
IoInitializeIrp
(
irp
,
size
,
stack_size
);
irp
->
AllocationFlags
=
IRP_ALLOCATED_FIXED_SIZE
;
if
(
stack_size
>=
1
&&
stack_size
<=
8
)
irp
->
AllocationFlags
=
IRP_ALLOCATED_FIXED_SIZE
;
if
(
charge_quota
)
irp
->
AllocationFlags
|=
IRP_LOOKASIDE_ALLOCATION
;
return
irp
;
...
...
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