albumart: avoid crash if substring is not found
Test case: https://soundcloud.com/audiotonic/audio_tonic_mr_mr_radio_1_2702 Signed-off-by: Eduardo Lima (Etrunko) <eblima@gmail.com>
This commit is contained in:
parent
fae6f88df7
commit
48d9936f9c
|
@ -133,12 +133,15 @@ _cb_http_complete(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
p = strstr(p, "src=\"http");
|
p = strstr(p, "src=\"http");
|
||||||
p += 5;
|
if (p)
|
||||||
pe = strchr(p, '"');
|
|
||||||
if (pe)
|
|
||||||
{
|
{
|
||||||
eina_strbuf_append_length(sb, p, pe - p);
|
p += 5;
|
||||||
ok = EINA_TRUE;
|
pe = strchr(p, '"');
|
||||||
|
if (pe)
|
||||||
|
{
|
||||||
|
eina_strbuf_append_length(sb, p, pe - p);
|
||||||
|
ok = EINA_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ok)
|
if (!ok)
|
||||||
|
|
Loading…
Reference in New Issue