diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-07-18 17:58:42 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-07-18 17:58:42 +0000 |
commit | 8205e1bbc73ef201556e01292c3dcdac85cb7a13 (patch) | |
tree | fa23517c6be9519645ab7d7c9e37161fb6624108 /src/inputStream_http.c | |
parent | 3f9682620c4ae885f2051b2c3662fc86f0175635 (diff) | |
download | mpd-8205e1bbc73ef201556e01292c3dcdac85cb7a13.tar.gz mpd-8205e1bbc73ef201556e01292c3dcdac85cb7a13.tar.xz mpd-8205e1bbc73ef201556e01292c3dcdac85cb7a13.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/inputStream_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 5330dfe62..e12866ef6 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -259,8 +259,8 @@ static int parseUrl(InputStreamHTTPData * data, char * url) { } else { user = malloc(at-temp+1); - strncpy(user, temp, colon-temp); - user[colon-temp] = '\0'; + strncpy(user, temp, at-temp); + user[at-temp] = '\0'; passwd = strdup(""); } |