diff options
author | Rob Bradford <rob@linux.intel.com> | 2010-08-25 16:23:29 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2010-08-27 12:24:38 +0100 |
commit | 833c4d3130b7750200cd41501db90fb9b9a515bd (patch) | |
tree | 6adc9ee18e281efc0acb04833c6e6eef0425338b | |
parent | 3eced94daa85485615184a147f413460341fa666 (diff) |
oauth-proxy-call: Prevent memory corruption by duplicating data
-rw-r--r-- | rest/oauth-proxy-call.c | 4 |
1 files changed, 3 insertions, 1 deletions
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)); } } |