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
be5d66f5
Commit
be5d66f5
authored
Jul 18, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe: Fix a potential leak and NULL dereference in DPMI_xrealloc.
parent
ea7bcc6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
int31.c
dlls/krnl386.exe16/int31.c
+9
-3
No files found.
dlls/krnl386.exe16/int31.c
View file @
be5d66f5
...
...
@@ -266,11 +266,11 @@ static void DPMI_xfree( LPVOID ptr )
static
LPVOID
DPMI_xrealloc
(
LPVOID
ptr
,
DWORD
newsize
)
{
MEMORY_BASIC_INFORMATION
mbi
;
LPVOID
newptr
;
newptr
=
DPMI_xalloc
(
newsize
);
if
(
ptr
)
{
LPVOID
newptr
;
if
(
!
VirtualQuery
(
ptr
,
&
mbi
,
sizeof
(
mbi
)))
{
FIXME
(
"realloc of DPMI_xallocd region %p?
\n
"
,
ptr
);
...
...
@@ -289,11 +289,17 @@ static LPVOID DPMI_xrealloc( LPVOID ptr, DWORD newsize )
if
(
newsize
<=
mbi
.
RegionSize
)
return
ptr
;
newptr
=
DPMI_xalloc
(
newsize
);
if
(
!
newptr
)
return
NULL
;
memcpy
(
newptr
,
ptr
,
mbi
.
RegionSize
);
DPMI_xfree
(
ptr
);
}
return
newptr
;
}
return
DPMI_xalloc
(
newsize
);
}
...
...
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