From 8ca4dfdb3e3deaa5246c1e339e773c90d2db7451 Mon Sep 17 00:00:00 2001 From: Andreas Obergrusberger Date: Sun, 17 Jun 2007 12:19:39 +0000 Subject: 2 critical bugs in leoslyrics lyrics src fixed git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@6630 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- plugins/leoslyrics/lyrics_leoslyrics.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins') 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; -- cgit v1.2.3