Hans Leidekker : msi: VolumeLabel and DiskPrompt are optional fields in the Media table.
Alexandre Julliard
julliard at winehq.org
Tue Jan 3 12:52:55 CST 2012
Module: wine
Branch: master
Commit: 2a1902161074ebe8bf1472f182983e9c4377f1af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a1902161074ebe8bf1472f182983e9c4377f1af
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Jan 3 13:53:50 2012 +0100
msi: VolumeLabel and DiskPrompt are optional fields in the Media table.
---
dlls/msi/media.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index f8ed27e..d5ace5a 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -820,10 +820,13 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS)
{
mi->disk_id = id;
- mi->volume_label = msi_realloc(mi->volume_label, ++volumesz * sizeof(WCHAR));
- lstrcpyW(mi->volume_label, volume);
- mi->disk_prompt = msi_realloc(mi->disk_prompt, ++promptsz * sizeof(WCHAR));
- lstrcpyW(mi->disk_prompt, prompt);
+ msi_free( mi->volume_label );
+ if (!(mi->volume_label = msi_alloc( ++volumesz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
+ strcpyW( mi->volume_label, volume );
+
+ msi_free( mi->disk_prompt );
+ if (!(mi->disk_prompt = msi_alloc( ++promptsz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
+ strcpyW( mi->disk_prompt, prompt );
if (source_matches_volume(mi, source))
{
More information about the wine-cvs
mailing list