James Hawkins : msi:
Fix a heap corruption bug by resizing the src string before adding to
it.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 13 06:29:07 CST 2006
Module: wine
Branch: master
Commit: 5cc4a8915f5b9873c16a2c2b6465d795fb05d019
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5cc4a8915f5b9873c16a2c2b6465d795fb05d019
Author: James Hawkins <truiken at gmail.com>
Date: Fri Nov 10 13:26:38 2006 -0800
msi: Fix a heap corruption bug by resizing the src string before adding to it.
---
dlls/msi/files.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 38b1f8f..dc81e6a 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -469,8 +469,13 @@ static UINT download_remote_cabinet(MSIP
*(ptr + 1) = '\0';
ptr = strrchrW(mi->source, '\\');
+ src = msi_realloc(src, (lstrlenW(src) + lstrlenW(ptr)) * sizeof(WCHAR));
+ if (!src)
+ return ERROR_OUTOFMEMORY;
+
lstrcatW(src, ptr + 1);
+ temppath[0] = '\0';
cab = msi_download_file(src, temppath);
lstrcpyW(mi->source, cab);
More information about the wine-cvs
mailing list