diff options
author | Andreas Obergrusberger <tradiaz@yahoo.de> | 2007-06-17 12:19:39 +0000 |
---|---|---|
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | 2007-06-17 12:19:39 +0000 |
commit | 8ca4dfdb3e3deaa5246c1e339e773c90d2db7451 (patch) | |
tree | ca2596feb714dfe383dcd0825a9261e1570c5fa0 /plugins | |
parent | 426c6c4c7fd400cc3bec6d73de36b0ac58e12419 (diff) | |
download | mpd-8ca4dfdb3e3deaa5246c1e339e773c90d2db7451.tar.gz mpd-8ca4dfdb3e3deaa5246c1e339e773c90d2db7451.tar.xz mpd-8ca4dfdb3e3deaa5246c1e339e773c90d2db7451.zip |
2 critical bugs in leoslyrics lyrics src fixed
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@6630 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/leoslyrics/lyrics_leoslyrics.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/leoslyrics/lyrics_leoslyrics.c b/plugins/leoslyrics/lyrics_leoslyrics.c index a62e47f05..5bcb32242 100644 --- a/plugins/leoslyrics/lyrics_leoslyrics.c +++ b/plugins/leoslyrics/lyrics_leoslyrics.c @@ -50,7 +50,7 @@ static void check_search_response(void *data, const char *name, { if(strstr(atts[2], "hid") != NULL) { - hid = atts[3]; + hid = strdup (atts[3]); } if(strstr(atts[2], "exactMatch") != NULL) @@ -120,6 +120,11 @@ int check_lyr_leoslyrics(char *artist, char *title, char *url) XML_ParserFree(parser); if(!(result & 4)) return -1; //check whether lyrics found + + CURL *curl = curl_easy_init (); + char *esc_hid = curl_easy_escape (curl, hid, 0); + free (hid); + snprintf(url, 512, LEOSLYRICS_CONTENT_URL, hid); return 0; |