Commit 49455434 authored by Warren Dukes's avatar Warren Dukes

don't use fucking sprintf

git-svn-id: https://svn.musicpd.org/mpd/trunk@1596 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent e0cbce6d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment