newkey = g_new(gchar, strnlen((char*)key, MAX_LENGTH_OF_ENV-1) + 1); memset(newkey, '\0', strnlen((char*)key, MAX_LENGTH_OF_ENV-1) + 1); strncat(newkey, "OCF_RESKEY_", 12); strncat(newkey, key, strnlen((char*)key, MAX_LENGTH_OF_ENV-12)); g_hash_table_insert(new_hashtable, (gpointer)newkey, value);
int keylen = strnlen((char*)key, MAX_LENGTH_OF_ENV-prefix)+prefix;  newkey = g_new(gchar, keylen); strncpy(newkey, "OCF_RESKEY_", keylen); strncat(newkey, key, keylen); g_hash_table_insert(new_hashtable, (gpointer)newkey, strdup(value));
add_prefix_foreach(gpointer key, gpointer value, gpointer user_data){	const int MAX_LENGTH_OF_ENV = 50;	GHashTable * new_hashtable = (GHashTable *) user_data;	char * newkey;	newkey = g_new(gchar, strnlen((char*)key, MAX_LENGTH_OF_ENV-1) + 1);	memset(newkey, '\0', strnlen((char*)key, MAX_LENGTH_OF_ENV-1) + 1); 	strncat(newkey, "OCF_RESKEY_", 12);	strncat(newkey, key, strnlen((char*)key, MAX_LENGTH_OF_ENV-12));	g_hash_table_insert(new_hashtable, (gpointer)newkey, value);}