winegdb: Fix crash in empty first command

Eric Pouech eric.pouech at wanadoo.fr
Fri Mar 10 14:44:52 CST 2006


Eric Pouech wrote:
> Vitor T. Sessak wrote:
> 
>> 2006/3/7, Eric Pouech
>>
>>>
>>> 2006/3/6, Vitor T. Sessak <vitor.sessak at m4x.org 
>>> <http://www.winehq.org/mailman/listinfo/wine-patches>>:
>>>
>>>> /
>>
>>
>> />>/ Changelog:
>> />>/ winegdb: Fix crash in empty first command
>> />>/
>> />>/ Winedbg crashes when pressing enter as its first command.
>> />
>>
>>>
>>> this is wrong as the last_line will be HeapFree'd when the next 
>>> command is
>>> keyed in.
>>
>>
>>
>> You are right. I've changed it and fixed the FIXME too.
> 
> your new code leaks the lines (you never free them)
to be more precise, when you copy the pointers, both last and this refer 
to the same buffer, which is not what you want
you should duplicate the buffer
A+
-- 
Eric Pouech




More information about the wine-devel mailing list