[xiph-commits] r7371 - icecast/branches/kh/icecast/src

karl at dactyl.lonelymoon.com karl
Tue Jul 27 11:26:10 PDT 2004


Author: karl
Date: Tue Jul 27 11:26:10 2004
New Revision: 7371

Modified:
icecast/branches/kh/icecast/src/slave.c
Log:
fix a string length bug


Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c	2004-07-27 18:21:58 UTC (rev 7370)
+++ icecast/branches/kh/icecast/src/slave.c	2004-07-27 18:26:05 UTC (rev 7371)
@@ -231,8 +231,9 @@
auth_header = malloc (len);
snprintf (auth_header, len, "%s:%s", relay->username, relay->password);
esc_authorisation = util_base64_encode(auth_header);
-            auth_header = malloc (len + 24);
-            snprintf (auth_header, len+24,
+            free(auth_header);
+            len = strlen (esc_authorisation) + 24;
+            snprintf (auth_header, len,
"Authorization: Basic %s\r\n", esc_authorisation);
free(esc_authorisation);
}



More information about the commits mailing list