soup-form: fix soup_form_decode() for multiple values with the same key
authorSven Neumann <s.neumann@raumfeld.com>
Tue, 18 Jan 2011 15:22:26 +0000 (10:22 -0500)
committerDan Winship <danw@gnome.org>
Tue, 18 Jan 2011 22:47:02 +0000 (17:47 -0500)
commitb1d9d87385884640426bbc907dcc2568810cb379
tree1786aab5e634dab7b85bb069e069b97dfaf45d3f
parent54cbf614d9b537a77fbcc9efbd2b947df3f2569e
soup-form: fix soup_form_decode() for multiple values with the same key

If multiple values in an urlencoded dataset use the same key, the
resulting value in the hash-table created by soup_form_decode() used
to point to memory that is already freed. That is because
g_hash_table_insert() frees the passed key which happens to point
to the memory that contains the new value. Fix this by using
g_hash_table_replace() instead.
libsoup/soup-form.c