Race fix in dlls/winmm/mmsystem.c

Eric Pouech eric.pouech at wanadoo.fr
Tue May 28 12:37:36 CDT 2002


> I fixed a race condition in mmsystem.c that could cause heap
corruption
> (and has done so): The problem is that the proc_PlaySound thread could
> exit (in case of error, like sound card not available) before the
> assignment wps->hThread = CreateThread(...) was completed. At the end
> of proc_PlaySound wps got freed, and the memory of wps->hThread gets
> the next free pointer in the heap control area.
> 
> Please review my patch carefully. I am not that much experienced with
> Windows and synchronisation, but I think, it should work.
Yes, your patch should work.
I have another (larger) fix for some other problems (and which shall
fix this one too). I'll send it later on today (when I'm back home)

A+



More information about the wine-patches mailing list