don't use fucking sprintf
git-svn-id: https://svn.musicpd.org/mpd/trunk@1596 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
e0cbce6d38
commit
49455434f4
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user