fix a bug in username and password parsing in http url's
git-svn-id: https://svn.musicpd.org/mpd/trunk@1877 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
3f9682620c
commit
8205e1bbc7
@ -259,8 +259,8 @@ static int parseUrl(InputStreamHTTPData * data, char * url) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
user = malloc(at-temp+1);
|
user = malloc(at-temp+1);
|
||||||
strncpy(user, temp, colon-temp);
|
strncpy(user, temp, at-temp);
|
||||||
user[colon-temp] = '\0';
|
user[at-temp] = '\0';
|
||||||
|
|
||||||
passwd = strdup("");
|
passwd = strdup("");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user