mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -05:00
Fix invalid read on empty string queries.
This commit is contained in:
parent
4efca3660f
commit
cdb0048082
@ -252,7 +252,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
|
||||
val[0] = '\%';
|
||||
}
|
||||
|
||||
if (val[strlen((char *)val) - 1] == '*')
|
||||
if (val[0] && val[1] && val[strlen((char *)val) - 1] == '*')
|
||||
{
|
||||
op = '\%';
|
||||
val[strlen((char *)val) - 1] = '\%';
|
||||
|
Loading…
Reference in New Issue
Block a user