DMLOADERe: Prevent crash on IDirectMusicLoaderResourceStream_IStream_Read if pcbRead is NULL

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Jun 13 14:17:35 CDT 2005


Juan Lang wrote:

>>-	TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", *pcbRead,
>>    
>>
>debugstr_an(pv, *pcbRead));
>  
>
>>+	TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", cb,
>>    
>>
>debugstr_an(pv, *pcbRead));
>
>Should that be:
>	TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", cb, debugstr_an(pv,
>cb));
>instead?
>
>--Juan
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>  
>
You are right. I failed to notice the second use of the suspicious 
pointer. Here is a corrected patch.

Alex Villacís Lasso

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-dmloader-loaderstream-nullcountptr.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050613/11822ac5/wine-dmloader-loaderstream-nullcountptr.bin


More information about the wine-patches mailing list