Recording with "Lexia" (mci "open new")
eric.pouech at wanadoo.fr
Sat Jun 10 15:30:44 CDT 2006
Peter Åstrand wrote:
>> 1) I believe the mciwave.c patch below makes sense in any case, right?
>>> Without it freed memory is used.
>> I don't see why ?
> wmw->openParms.lpstrElementName and filename is a pointer to the same
> memory, due to this statement in WAVE_mciOpen:
> memcpy(&wmw->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMSA));
actually not exactly as mciOpenFile is called with
but you're right that the code is wrong, as we're freeing the
lpstrElementName as passed by the calling program
the right fix would be to set wmw->openParms.lpstrElementName to NULL
after memcpy:ing lpOpenParams in mciOpen
More information about the wine-devel