Can you also check scaexec.cpp (wix2.0):
 
I believe this should be fixed:(line 610 onwards)
 
before:
hr = WcaReadStringFromCaData(&pwz, &pwzTemp);

ExitOnFailure1(hr, "failed to read log file spec name from custom action data: 
%S", pwz);

hr = StringCchCopyW(sfLog.wzName, countof(sfDb.wzName), pwzTemp);

ExitOnFailure1(hr, "failed to copy log file spec name: %S", pwzTemp);

After:

hr = WcaReadStringFromCaData(&pwz, &pwzTemp);

ExitOnFailure1(hr, "failed to read log file spec name from custom action data: 
%S", pwz);

hr = StringCchCopyW(sfLog.wzName, countof(sfLog.wzName), pwzTemp);

ExitOnFailure1(hr, "failed to copy log file spec name: %S", pwzTemp);

Same goes for the other 4 StringCchCopyW

Rene


________________________________

From: [EMAIL PROTECTED] on behalf of Dana Gutride
Sent: Wed 8/22/2007 19:42
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] ConfigureSQL Leaked MSIHANDLE


We think we've identified a fix for this problem.  We've made sure the strings 
are null terminated and also changed the strutil file so it wouldn't be looking 
beyond the end of the array.  After introducing this fix, we've run our 
upgrades and installs 8-10 times without any failures so far (we're still 
holding our breaths, though). 

Two files were edited:
src/ca/serverca/scasched/scasqlstr.cpp (line 269)

Before:           
// We have an ANSI string so convert it to UNICODE. 
            cchScript = cbScript;

            hr = StrAllocStringAnsi(&pwzScriptBuffer, 
reinterpret_cast<LPCSTR>(pbScript), cchScript, CP_ACP);
            ExitOnFailure1(hr, "Failed to allocate WCHAR string of size '%d'", 
cchScript); 

After:
            LPSTR pszScript = reinterpret_cast<LPSTR>(pbScript);
            pszScript[cbRead] = '\0';
            cchScript = cbRead;

            // We have an ANSI string so convert it to UNICODE.
            hr = StrAllocStringAnsi(&pwzScriptBuffer, pszScript, cchScript, 
CP_ACP);
            ExitOnFailure1(hr, "Failed to allocate WCHAR string of size '%d'", 
cchScript); 



src/dutil/strutil.cpp (Line 246)

Before:
      else if (L'\0' == szSource[cchSource]) // if the source already had a 
null terminator, don't count that in the character count because we track it 
below 


After:
    else if (L'\0' == szSource[cchSource-1]) // if the source already had a 
null terminator, don't count that in the character count because we track it 
below 



Dana



On 8/22/07, Dana Gutride <[EMAIL PROTECTED]> wrote: 

        Hi all:
        
        We are using the latest 2.0 build of wix and are now seeing this bug 
80-90% of the time during installs.  Has anybody made any progress in nailing 
down these leaked MSI Handles in the sql custom actions?
        
        Thanks,
        Dana
        




This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to