From 833c4d3130b7750200cd41501db90fb9b9a515bd Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 25 Aug 2010 16:23:29 +0100 Subject: oauth-proxy-call: Prevent memory corruption by duplicating data --- rest/oauth-proxy-call.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c index 3b5a859..d83267f 100644 --- a/rest/oauth-proxy-call.c +++ b/rest/oauth-proxy-call.c @@ -203,7 +203,9 @@ steal_oauth_params (RestProxyCall *call, GHashTable *oauth_params) rest_params_iter_init (&iter, params); while (rest_params_iter_next (&iter, &name, ¶m)) { if (rest_param_is_string (param) && g_str_has_prefix (name, "oauth_")) { - g_hash_table_insert (oauth_params, g_strdup (name), (gpointer)rest_param_get_content (param)); + g_hash_table_insert (oauth_params, + g_strdup (name), + g_strdup (rest_param_get_content (param))); to_remove = g_list_prepend (to_remove, g_strdup (name)); } } -- cgit v1.2.1