[PATCH] ieframe: Make sure that history initial state is fully initialized.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Apr 25 06:50:53 CDT 2022
In addition to 41cfc86d8dd65c71a7c81b826d02ac0a99050d6a.
This fixes another crash when browsing help file that I have here.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/ieframe/dochost.c | 4 ++--
dlls/ieframe/ieframe.h | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/ieframe/dochost.c b/dlls/ieframe/dochost.c
index 7717f786d52..4e1e1d82fa1 100644
--- a/dlls/ieframe/dochost.c
+++ b/dlls/ieframe/dochost.c
@@ -436,7 +436,7 @@ static void update_travellog(DocHost *This)
}
if(!This->travellog.log) {
- This->travellog.log = heap_alloc(4 * sizeof(*This->travellog.log));
+ This->travellog.log = heap_alloc_zero(4 * sizeof(*This->travellog.log));
if(!This->travellog.log)
return;
@@ -444,7 +444,7 @@ static void update_travellog(DocHost *This)
}else if(This->travellog.size < This->travellog.position+1) {
travellog_entry_t *new_travellog;
- new_travellog = heap_realloc(This->travellog.log, This->travellog.size*2*sizeof(*This->travellog.log));
+ new_travellog = heap_realloc_zero(This->travellog.log, This->travellog.size*2*sizeof(*This->travellog.log));
if(!new_travellog)
return;
diff --git a/dlls/ieframe/ieframe.h b/dlls/ieframe/ieframe.h
index 633906a70ca..1bae1f6781d 100644
--- a/dlls/ieframe/ieframe.h
+++ b/dlls/ieframe/ieframe.h
@@ -340,6 +340,11 @@ static inline void unlock_module(void) {
InterlockedDecrement(&module_ref);
}
+static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, SIZE_T len)
+{
+ return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len);
+}
+
static inline LPWSTR heap_strdupW(LPCWSTR str)
{
LPWSTR ret = NULL;
--
2.35.3
More information about the wine-devel
mailing list