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
cf8b84c1
Commit
cf8b84c1
authored
Oct 15, 2003
by
Oleg Prokhorov
Committed by
Alexandre Julliard
Oct 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another portion of HeapReAlloc fixes.
parent
8c4ef674
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
13 deletions
+63
-13
lolvldrv.c
dlls/winmm/lolvldrv.c
+8
-2
time.c
dlls/winmm/time.c
+6
-1
audio.c
dlls/winmm/winejack/audio.c
+5
-1
audio.c
dlls/winmm/wineoss/audio.c
+7
-2
info.c
dlls/winspool/info.c
+7
-1
palette.c
graphics/x11drv/palette.c
+6
-2
curses.c
programs/wineconsole/curses.c
+5
-1
wineconsole.c
programs/wineconsole/wineconsole.c
+6
-1
hlpfile.c
programs/winhelp/hlpfile.c
+13
-2
No files found.
dlls/winmm/lolvldrv.c
View file @
cf8b84c1
...
...
@@ -564,9 +564,15 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg)
part
->
nIDMin
,
part
->
nIDMax
,
llTypes
[
type
].
wMaxId
,
lpDrv
->
drvname
,
llTypes
[
type
].
typestr
);
/* realloc translation table */
llTypes
[
type
].
lpMlds
=
(
LPWINE_MLD
)
HeapReAlloc
(
GetProcessHeap
(),
0
,
(
llTypes
[
type
].
lpMlds
)
?
llTypes
[
type
].
lpMlds
-
1
:
NULL
,
if
(
llTypes
[
type
].
lpMlds
)
llTypes
[
type
].
lpMlds
=
(
LPWINE_MLD
)
HeapReAlloc
(
GetProcessHeap
(),
0
,
llTypes
[
type
].
lpMlds
-
1
,
sizeof
(
WINE_MLD
)
*
(
llTypes
[
type
].
wMaxId
+
1
))
+
1
;
else
llTypes
[
type
].
lpMlds
=
(
LPWINE_MLD
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WINE_MLD
)
*
(
llTypes
[
type
].
wMaxId
+
1
))
+
1
;
/* re-build the translation table */
if
(
llTypes
[
type
].
nMapper
!=
-
1
)
{
TRACE
(
"%s:Trans[%d] -> %s
\n
"
,
llTypes
[
type
].
typestr
,
-
1
,
MMDrvs
[
llTypes
[
type
].
nMapper
].
drvname
);
...
...
dlls/winmm/time.c
View file @
cf8b84c1
...
...
@@ -126,10 +126,15 @@ static void CALLBACK TIME_MMSysTimeCallback(LPWINE_MM_IDATA iData)
lpTimer
->
uCurTime
+=
lpTimer
->
wDelay
-
MMSYSTIME_MININTERVAL
;
if
(
lpTimer
->
lpFunc
)
{
if
(
idx
==
iData
->
nSizeLpTimers
)
{
iData
->
lpTimers
=
(
LPWINE_TIMERENTRY
)
if
(
iData
->
lpTimers
)
iData
->
lpTimers
=
(
LPWINE_TIMERENTRY
)
HeapReAlloc
(
GetProcessHeap
(),
0
,
iData
->
lpTimers
,
++
iData
->
nSizeLpTimers
*
sizeof
(
WINE_TIMERENTRY
));
else
iData
->
lpTimers
=
(
LPWINE_TIMERENTRY
)
HeapAlloc
(
GetProcessHeap
(),
0
,
++
iData
->
nSizeLpTimers
*
sizeof
(
WINE_TIMERENTRY
));
}
iData
->
lpTimers
[
idx
++
]
=
*
lpTimer
;
}
...
...
dlls/winmm/winejack/audio.c
View file @
cf8b84c1
...
...
@@ -450,7 +450,11 @@ int JACK_bufsize (nframes_t nframes, void *arg)
wwo
->
buffer_size
,
buffer_required
);
TRACE
(
"GetProcessHeap() == %p
\n
"
,
GetProcessHeap
());
wwo
->
buffer_size
=
buffer_required
;
wwo
->
sound_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
wwo
->
sound_buffer
,
wwo
->
buffer_size
);
if
(
wwo
->
sound_buffer
)
wwo
->
sound_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
wwo
->
sound_buffer
,
wwo
->
buffer_size
);
else
wwo
->
sound_buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wwo
->
buffer_size
);
/* if we don't have a buffer then error out */
if
(
!
wwo
->
sound_buffer
)
...
...
dlls/winmm/wineoss/audio.c
View file @
cf8b84c1
...
...
@@ -3341,8 +3341,13 @@ static HRESULT WINAPI IDsDriverNotifyImpl_SetNotificationPositions(
/* Make an internal copy of the caller-supplied array.
* Replace the existing copy if one is already present. */
This
->
notifies
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
notifies
,
howmuch
*
sizeof
(
DSBPOSITIONNOTIFY
));
if
(
This
->
notifies
)
This
->
notifies
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
notifies
,
howmuch
*
sizeof
(
DSBPOSITIONNOTIFY
));
else
This
->
notifies
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
howmuch
*
sizeof
(
DSBPOSITIONNOTIFY
));
memcpy
(
This
->
notifies
,
notify
,
howmuch
*
sizeof
(
DSBPOSITIONNOTIFY
));
This
->
nrofnotifies
=
howmuch
;
...
...
dlls/winspool/info.c
View file @
cf8b84c1
...
...
@@ -430,8 +430,14 @@ static HANDLE WINSPOOL_GetOpenedPrinterEntry( LPCWSTR name )
if
(
i
>=
nb_printers
)
{
LPWSTR
*
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
printer_array
,
LPWSTR
*
new_array
;
if
(
printer_array
)
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
printer_array
,
(
nb_printers
+
16
)
*
sizeof
(
*
new_array
)
);
else
new_array
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
nb_printers
+
16
)
*
sizeof
(
*
new_array
)
);
if
(
!
new_array
)
return
0
;
printer_array
=
new_array
;
nb_printers
+=
16
;
...
...
graphics/x11drv/palette.c
View file @
cf8b84c1
...
...
@@ -1062,9 +1062,13 @@ static UINT X11DRV_PALETTE_SetMapping( PALETTEOBJ* palPtr, UINT uStart, UINT uNu
X11DRV_PALETTE_FormatSystemPalette
();
/* initialize palette mapping table */
mapping
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
palPtr
->
mapping
,
if
(
palPtr
->
mapping
)
mapping
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
palPtr
->
mapping
,
sizeof
(
int
)
*
palPtr
->
logpalette
.
palNumEntries
);
else
mapping
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
int
)
*
palPtr
->
logpalette
.
palNumEntries
);
if
(
mapping
==
NULL
)
{
ERR
(
"Can not allocate new mapping -- memory exausted!
\n
"
);
return
0
;
...
...
programs/wineconsole/curses.c
View file @
cf8b84c1
...
...
@@ -223,7 +223,11 @@ static void WCCURSES_ResizeScreenBuffer(struct inner_data* data)
PRIVATE
(
data
)
->
pad
=
newpad
(
data
->
curcfg
.
sb_height
,
data
->
curcfg
.
sb_width
);
if
(
!
PRIVATE
(
data
)
->
pad
)
WINE_FIXME
(
"Cannot create pad
\n
"
);
PRIVATE
(
data
)
->
line
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
PRIVATE
(
data
)
->
line
,
if
(
PRIVATE
(
data
)
->
line
)
PRIVATE
(
data
)
->
line
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
PRIVATE
(
data
)
->
line
,
sizeof
(
chtype
)
*
data
->
curcfg
.
sb_width
);
else
PRIVATE
(
data
)
->
line
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
chtype
)
*
data
->
curcfg
.
sb_width
);
}
...
...
programs/wineconsole/wineconsole.c
View file @
cf8b84c1
...
...
@@ -291,8 +291,13 @@ int WINECON_GrabChanges(struct inner_data* data)
data
->
curcfg
.
sb_width
=
evts
[
i
].
u
.
resize
.
width
;
data
->
curcfg
.
sb_height
=
evts
[
i
].
u
.
resize
.
height
;
data
->
cells
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
data
->
cells
,
if
(
data
->
cells
)
data
->
cells
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
data
->
cells
,
data
->
curcfg
.
sb_width
*
data
->
curcfg
.
sb_height
*
sizeof
(
CHAR_INFO
));
else
data
->
cells
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
data
->
curcfg
.
sb_width
*
data
->
curcfg
.
sb_height
*
sizeof
(
CHAR_INFO
));
if
(
!
data
->
cells
)
WINECON_Fatal
(
"OOM
\n
"
);
data
->
fnResizeScreenBuffer
(
data
);
data
->
fnComputePositions
(
data
);
...
...
programs/winhelp/hlpfile.c
View file @
cf8b84c1
...
...
@@ -776,8 +776,13 @@ static BOOL HLPFILE_LoadGfxByIndex(HLPFILE *hlpfile, unsigned index,
if
(
index
>=
hlpfile
->
numBmps
)
{
hlpfile
->
numBmps
=
index
+
1
;
hlpfile
->
bmps
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
hlpfile
->
bmps
,
if
(
hlpfile
->
bmps
)
hlpfile
->
bmps
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
hlpfile
->
bmps
,
hlpfile
->
numBmps
*
sizeof
(
hlpfile
->
bmps
[
0
]));
else
hlpfile
->
bmps
=
HeapAlloc
(
GetProcessHeap
(),
0
,
hlpfile
->
numBmps
*
sizeof
(
hlpfile
->
bmps
[
0
]));
}
hlpfile
->
bmps
[
index
]
=
paragraph
->
u
.
gfx
.
u
.
bmp
.
hBitmap
;
}
...
...
@@ -1395,8 +1400,14 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
case
6
:
if
(
GET_USHORT
(
ptr
,
2
)
!=
90
)
{
WINE_WARN
(
"system6
\n
"
);
break
;}
hlpfile
->
windows
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
hlpfile
->
windows
,
if
(
hlpfile
->
windows
)
hlpfile
->
windows
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
hlpfile
->
windows
,
sizeof
(
HLPFILE_WINDOWINFO
)
*
++
hlpfile
->
numWindows
);
else
hlpfile
->
windows
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HLPFILE_WINDOWINFO
)
*
++
hlpfile
->
numWindows
);
if
(
hlpfile
->
windows
)
{
unsigned
flags
=
GET_USHORT
(
ptr
,
4
);
...
...
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