Reply To: svn-1171 BUG w/ patch – Bad smart playlist causes segv


@kit wrote:

If you create a smart playlist with invalid rules such as the following text :

title = “foo”
title = “foo”

The server seg faults. sp_get_error() is called, but in some cases no specific error value has been set. I don’t see a way to attach a patch directly to my message, so here it is in the body.

Nice catch. It’s actually in sp_parse_phrase, when it token_id != T_EOF, and the error returned should be “Expecting end of statement” or something.

I’ve patched mine there, rather than at the get_error, but I’ve also added some defensive code similar to yours in case I forget another one. 🙂

Thanks. Bug reports with patches kick ass. 😛