msi: source one off error correction

Aric Stewart aric at codeweavers.com
Mon Jul 11 11:28:36 CDT 2005


True, there shouldn't be because that string is of format 
<char>;<int>;<path>

but i will work out some better error checking to handle garbage strings 
more gracefully.

-aric

Mike McCormack wrote:

>
> Aric Stewart wrote:
>
>>              rc = RegQueryValueExW(sourcekey, 
>> INSTALLPROPERTY_LASTUSEDSOURCEstringW,
>>                      0, 0, (LPBYTE)buffer,&size);              ptr = 
>> strchrW(buffer,';');
>> +            ptr ++;
>>              ptr = strchrW(ptr,';');
>>              if (!ptr)
>>                  rc = ERROR_UNKNOWN_PROPERTY;
>
>
> This will crash immediately if there's anything other than a string 
> with ;; in it in the registry.
>
> Mike
>




More information about the wine-devel mailing list