Robert Buchholz wrote:
> Hi,
>
> while testing mpd support in lcd4linux, I encountered a program abort
> because of an illegal free() operation. This was caused by the attempt
> to free() a char[] on the stack (artist, title and album functions).
>
> While I had a look over the code, I also saw some memleaks in the other
> functions (elapsedTime and friends) and a buffer overflow issue for sprintf.
>
> The attached patch against r789 in the 0.10.1 branch should fix the issues.
I just experienced another crash when the mpd side closes the connection
and the error handling code does some null pointer dereferences.
I revised the patch to gracefully handle losing connections. It still
prints a lot of errors, but the screen will end up blank after a minute
and when mpd comes back up, it works again.
Robert
|