/pidgin/main: aa0328600eb6: HTTP: fix use-after-free. Fixes #15905

Tomasz Wasilczyk twasilczyk at pidgin.im
Sat Feb 1 15:26:49 EST 2014


Changeset: aa0328600eb600767a08cf24aa92b01114562a76
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-02-01 21:26 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/aa0328600eb6

Description:

HTTP: fix use-after-free. Fixes #15905

diffstat:

 libpurple/http.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (19 lines):

diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -305,13 +305,14 @@ static time_t purple_http_rfc1123_to_tim
 		g_match_info_free(match_info);
 		return 0;
 	}
-	g_match_info_free(match_info);
 
 	d_date = g_match_info_fetch(match_info, 1);
 	d_month = g_match_info_fetch(match_info, 2);
 	d_year = g_match_info_fetch(match_info, 3);
 	d_time = g_match_info_fetch(match_info, 4);
 
+	g_match_info_free(match_info);
+
 	month = 0;
 	while (months[month] != NULL)
 	{



More information about the Commits mailing list