[PATCH v2 0/1] MR1460: hhctrl: Handle memory allocation failure in GetChmString.
-- v2: hhctrl: Handle memory allocation failure in GetChmString. https://gitlab.winehq.org/wine/wine/-/merge_requests/1460
From: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/hhctrl.ocx/chm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 3a9a8fa9e7a..aa04a05fa33 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -32,18 +32,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) { LPCSTR str; + char **new_strings; if(!chm->strings_stream) return NULL; if(chm->strings_size <= (offset >> BLOCK_BITS)) { chm->strings_size = (offset >> BLOCK_BITS)+1; - if(chm->strings) - chm->strings = heap_realloc_zero(chm->strings, + if(chm->strings) { + new_strings = heap_realloc_zero(chm->strings, chm->strings_size*sizeof(char*)); - else + if(!new_strings) + return NULL; + chm->strings = new_strings; + }else { chm->strings = heap_alloc_zero( chm->strings_size*sizeof(char*)); + if(!chm->strings) + return NULL; + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1460
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126594 Your paranoid android. === debian11 (32 bit report) === d3d8: stateblock: Timeout visual: Timeout d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout d3dcompiler_43: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout d3dcompiler_46: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout d3dcompiler_47: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout Report validation errors: d3drm:d3drm timeout === debian11 (build log) === WineRunWineTest.pl:error: The task timed out
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Marvin