From 49455434f4f04784c02d4d23cfaa7688a3d4edbf Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 21 Jun 2004 00:48:34 +0000 Subject: [PATCH] don't use fucking sprintf git-svn-id: https://svn.musicpd.org/mpd/trunk@1596 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputStream_http.c | 7 ++++--- 1 file 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);