Mike McCormack : msi: Eliminate a fixed length buffer.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 16 14:37:45 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 477bce38dc5b0efeb55b5cc407b3ff32eed19c3f
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=477bce38dc5b0efeb55b5cc407b3ff32eed19c3f
Author: Mike McCormack <mike at codeweavers.com>
Date: Mon Jan 16 20:38:28 2006 +0100
msi: Eliminate a fixed length buffer.
---
dlls/msi/action.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 6f4ce41..61dd099 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2849,10 +2849,8 @@ static UINT ACTION_RegisterTypeLibraries
static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
{
MSIPACKAGE *package = (MSIPACKAGE*)param;
- LPWSTR target_file, target_folder;
+ LPWSTR target_file, target_folder, filename;
LPCWSTR buffer;
- WCHAR filename[0x100];
- DWORD sz;
MSICOMPONENT *comp;
static const WCHAR szlnk[]={'.','l','n','k',0};
IShellLinkW *sl;
@@ -2899,13 +2897,13 @@ static UINT ITERATE_CreateShortcuts(MSIR
/* may be needed because of a bug somehwere else */
create_full_pathW(target_folder);
- sz = 0x100;
- MSI_RecordGetStringW(row,3,filename,&sz);
+ filename = msi_dup_record_field( row, 3 );
reduce_to_longfilename(filename);
if (!strchrW(filename,'.') || strcmpiW(strchrW(filename,'.'),szlnk))
strcatW(filename,szlnk);
target_file = build_directory_name(2, target_folder, filename);
msi_free(target_folder);
+ msi_free(filename);
buffer = MSI_RecordGetString(row,5);
if (strchrW(buffer,'['))
More information about the wine-cvs
mailing list