aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-10-02 19:45:26 -0700
committerWilmer van der Gaast <wilmer@gaast.net>2010-10-02 19:45:26 -0700
commit8e9e2b7d9e54744cee32b3724391bf0ad04e8aff (patch)
tree6cafdc57bb8143306daf8ef8288d09754f39b451 /lib/misc.c
parent88de0c96136313e553113f69cfc6ae544a5f5954 (diff)
parent2af3e232ff468b288dd4e0dbdab1a17312d801c5 (diff)
Merging mainline, which includes a huge msnp13 merge.
Not 100% sure about the OpenSSL merge, should double check that but I'm currently offline.
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/misc.c b/lib/misc.c
index c37996fc..05192d9c 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -307,11 +307,10 @@ void http_decode( char *s )
/* This fuction is safe, but make sure you call it safely as well! */
void http_encode( char *s )
{
- char *t;
+ char t[strlen(s)+1];
int i, j;
- t = g_strdup( s );
-
+ strcpy( t, s );
for( i = j = 0; t[i]; i ++, j ++ )
{
/* Warning: isalnum() is locale-aware, so don't use it here! */
@@ -329,8 +328,6 @@ void http_encode( char *s )
}
}
s[j] = 0;
-
- g_free( t );
}
/* Strip newlines from a string. Modifies the string passed to it. */