Module: wine Branch: master Commit: c3ef1a6c67673b846dabed4c5e9c0b4f25b5849e URL: https://gitlab.winehq.org/wine/wine/-/commit/c3ef1a6c67673b846dabed4c5e9c0b4...
Author: Bernhard Übelacker bernhardu@mailbox.org Date: Sat Jan 20 14:21:16 2024 +0100
dbghelp: Return early if HeapAlloc failed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56223
---
dlls/dbghelp/msc.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 7f695928e4a..a62667ea8c3 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -3036,6 +3036,7 @@ static void* pdb_jg_read(const struct PDB_JG_HEADER* pdb, const WORD* block_list
num_blocks = (size + pdb->block_size - 1) / pdb->block_size; buffer = HeapAlloc(GetProcessHeap(), 0, num_blocks * pdb->block_size); + if (!buffer) return NULL;
for (i = 0; i < num_blocks; i++) memcpy(buffer + i * pdb->block_size, @@ -3054,6 +3055,7 @@ static void* pdb_ds_read(const struct PDB_DS_HEADER* pdb, const UINT *block_list
num_blocks = (size + pdb->block_size - 1) / pdb->block_size; buffer = HeapAlloc(GetProcessHeap(), 0, num_blocks * pdb->block_size); + if (!buffer) return NULL;
for (i = 0; i < num_blocks; i++) memcpy(buffer + i * pdb->block_size,