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
947c61e4
Commit
947c61e4
authored
Oct 09, 2003
by
Oleg Prokhorov
Committed by
Alexandre Julliard
Oct 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid HeapReAlloc of a NULL pointer.
parent
64ed084e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
ne_segment.c
dlls/kernel/ne_segment.c
+7
-1
vga.c
dlls/winedos/vga.c
+6
-2
directory.c
files/directory.c
+6
-1
No files found.
dlls/kernel/ne_segment.c
View file @
947c61e4
...
@@ -824,11 +824,17 @@ struct ne_init_list
...
@@ -824,11 +824,17 @@ struct ne_init_list
static
void
add_to_init_list
(
struct
ne_init_list
*
list
,
NE_MODULE
*
hModule
)
static
void
add_to_init_list
(
struct
ne_init_list
*
list
,
NE_MODULE
*
hModule
)
{
{
NE_MODULE
**
newModule
=
NULL
;
if
(
list
->
count
==
list
->
size
)
if
(
list
->
count
==
list
->
size
)
{
{
int
newSize
=
list
->
size
+
128
;
int
newSize
=
list
->
size
+
128
;
NE_MODULE
**
newModule
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
if
(
list
->
module
)
newModule
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
list
->
module
,
newSize
*
sizeof
(
NE_MODULE
*
)
);
list
->
module
,
newSize
*
sizeof
(
NE_MODULE
*
)
);
else
newModule
=
HeapAlloc
(
GetProcessHeap
(),
0
,
newSize
*
sizeof
(
NE_MODULE
*
)
);
if
(
!
newModule
)
if
(
!
newModule
)
{
{
FIXME_
(
dll
)(
"Out of memory!"
);
FIXME_
(
dll
)(
"Out of memory!"
);
...
...
dlls/winedos/vga.c
View file @
947c61e4
...
@@ -665,9 +665,13 @@ void VGA_PrepareVideoMemCopy(unsigned Xres, unsigned Yres)
...
@@ -665,9 +665,13 @@ void VGA_PrepareVideoMemCopy(unsigned Xres, unsigned Yres)
/*
/*
* Allocate space for char + attr.
* Allocate space for char + attr.
*/
*/
vga_text_old
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
vga_text_old
,
Xres
*
Yres
*
2
);
if
(
vga_text_old
)
vga_text_old
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
vga_text_old
,
Xres
*
Yres
*
2
);
else
vga_text_old
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
Xres
*
Yres
*
2
);
p
=
VGA_AlphaBuffer
();
p
=
VGA_AlphaBuffer
();
p2
=
vga_text_old
;
p2
=
vga_text_old
;
...
...
files/directory.c
View file @
947c61e4
...
@@ -723,7 +723,12 @@ static BOOL DIR_SearchSemicolonedPaths(LPCWSTR name, DOS_FULL_NAME *full_name, L
...
@@ -723,7 +723,12 @@ static BOOL DIR_SearchSemicolonedPaths(LPCWSTR name, DOS_FULL_NAME *full_name, L
if
(
newlen
>
currlen
)
if
(
newlen
>
currlen
)
{
{
if
(
!
(
buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
,
newlen
*
sizeof
(
WCHAR
))))
if
(
buffer
)
buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
,
newlen
*
sizeof
(
WCHAR
));
else
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
newlen
*
sizeof
(
WCHAR
));
if
(
!
buffer
)
goto
done
;
goto
done
;
currlen
=
newlen
;
currlen
=
newlen
;
}
}
...
...
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