From b851d46552f1f5f6641be212d2fae7ece791d10b Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 27 Oct 2006 17:29:19 +0900 Subject: [PATCH] msi: Avoid crashing if writeout_cabinet_stream fails. --- dlls/msi/files.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 99cc6b5565d..6c5b2882a32 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -490,11 +490,16 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi, /* the stream does not contain the # character */ if (cab[0]=='#') { - LPWSTR path; + LPWSTR path, p; + + rc = writeout_cabinet_stream(package,&cab[1],mi->source); + if (rc != ERROR_SUCCESS) + return rc; - writeout_cabinet_stream(package,&cab[1],mi->source); mi->last_path = strdupW(mi->source); - *(strrchrW(mi->last_path,'\\')+1)=0; + p = strrchrW(mi->last_path,'\\'); + if (p) + p[1] = 0; path = msi_dup_property( package, cszSourceDir ); -- 2.11.4.GIT