diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-21 00:48:34 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-21 00:48:34 +0000 |
commit | 49455434f4f04784c02d4d23cfaa7688a3d4edbf (patch) | |
tree | 78aea4fa30333321b3030548646bb87e7a3c0eff | |
parent | e0cbce6d38488b2c02b86ddd7a0d31b43a465713 (diff) | |
download | mpd-49455434f4f04784c02d4d23cfaa7688a3d4edbf.tar.gz mpd-49455434f4f04784c02d4d23cfaa7688a3d4edbf.tar.xz mpd-49455434f4f04784c02d4d23cfaa7688a3d4edbf.zip |
don't use fucking sprintf
git-svn-id: https://svn.musicpd.org/mpd/trunk@1596 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputStream_http.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 4374d654d..fc274800b 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -165,9 +165,10 @@ static char * proxyAuthString(char * user, char * password) { if(!user || !password) return NULL; templen = strlen(user) + strlen(password) + 2; - temp = calloc(templen, 1); - snprintf(temp, templen, "%s:%s", user, password); - temp[templen-1] = '\0'; + temp = malloc(templen); + strcpy(temp, user); + strcat(temp, ":"); + strcat(temp, password); temp64 = base64Dup(temp); free(temp); |