|
|
56fe68 |
diff -up pidgin-2.10.7/libpurple/conversation.c.CVE-2013-6477 pidgin-2.10.7/libpurple/conversation.c
|
|
|
56fe68 |
--- pidgin-2.10.7/libpurple/conversation.c.CVE-2013-6477 2013-02-11 04:16:51.000000000 -0500
|
|
|
56fe68 |
+++ pidgin-2.10.7/libpurple/conversation.c 2014-01-29 20:17:16.584055979 -0500
|
|
|
56fe68 |
@@ -1551,6 +1551,14 @@ purple_conv_chat_write(PurpleConvChat *c
|
|
|
56fe68 |
if (purple_conv_chat_is_user_ignored(chat, who))
|
|
|
56fe68 |
return;
|
|
|
56fe68 |
|
|
|
56fe68 |
+ if (mtime < 0) {
|
|
|
56fe68 |
+ purple_debug_error("conversation",
|
|
|
56fe68 |
+ "purple_conv_chat_write ignoring negative timestamp\n");
|
|
|
56fe68 |
+ /* TODO: Would be more appropriate to use a value that indicates
|
|
|
56fe68 |
+ that the timestamp is unknown, and surface that in the UI. */
|
|
|
56fe68 |
+ mtime = time(NULL);
|
|
|
56fe68 |
+ }
|
|
|
56fe68 |
+
|
|
|
56fe68 |
if (!(flags & PURPLE_MESSAGE_WHISPER)) {
|
|
|
56fe68 |
const char *str;
|
|
|
56fe68 |
|
|
|
56fe68 |
diff -up pidgin-2.10.7/libpurple/log.c.CVE-2013-6477 pidgin-2.10.7/libpurple/log.c
|
|
|
56fe68 |
--- pidgin-2.10.7/libpurple/log.c.CVE-2013-6477 2013-02-11 04:16:51.000000000 -0500
|
|
|
56fe68 |
+++ pidgin-2.10.7/libpurple/log.c 2014-01-29 20:17:16.584055979 -0500
|
|
|
56fe68 |
@@ -753,7 +753,7 @@ static char *log_get_timestamp(PurpleLog
|
|
|
56fe68 |
{
|
|
|
56fe68 |
gboolean show_date;
|
|
|
56fe68 |
char *date;
|
|
|
56fe68 |
- struct tm tm;
|
|
|
56fe68 |
+ struct tm *tm;
|
|
|
56fe68 |
|
|
|
56fe68 |
show_date = (log->type == PURPLE_LOG_SYSTEM) || (time(NULL) > when + 20*60);
|
|
|
56fe68 |
|
|
|
56fe68 |
@@ -763,11 +763,11 @@ static char *log_get_timestamp(PurpleLog
|
|
|
56fe68 |
if (date != NULL)
|
|
|
56fe68 |
return date;
|
|
|
56fe68 |
|
|
|
56fe68 |
- tm = *(localtime(&when));
|
|
|
56fe68 |
+ tm = localtime(&when);
|
|
|
56fe68 |
if (show_date)
|
|
|
56fe68 |
- return g_strdup(purple_date_format_long(&tm));
|
|
|
56fe68 |
+ return g_strdup(purple_date_format_long(tm));
|
|
|
56fe68 |
else
|
|
|
56fe68 |
- return g_strdup(purple_time_format(&tm));
|
|
|
56fe68 |
+ return g_strdup(purple_time_format(tm));
|
|
|
56fe68 |
}
|
|
|
56fe68 |
|
|
|
56fe68 |
/* NOTE: This can return msg (which you may or may not want to g_free())
|
|
|
56fe68 |
diff -up pidgin-2.10.7/libpurple/server.c.CVE-2013-6477 pidgin-2.10.7/libpurple/server.c
|
|
|
56fe68 |
--- pidgin-2.10.7/libpurple/server.c.CVE-2013-6477 2013-02-11 04:16:53.000000000 -0500
|
|
|
56fe68 |
+++ pidgin-2.10.7/libpurple/server.c 2014-01-29 20:17:16.585055993 -0500
|
|
|
56fe68 |
@@ -567,6 +567,14 @@ void serv_got_im(PurpleConnection *gc, c
|
|
|
56fe68 |
|
|
|
56fe68 |
account = purple_connection_get_account(gc);
|
|
|
56fe68 |
|
|
|
56fe68 |
+ if (mtime < 0) {
|
|
|
56fe68 |
+ purple_debug_error("server",
|
|
|
56fe68 |
+ "serv_got_im ignoring negative timestamp\n");
|
|
|
56fe68 |
+ /* TODO: Would be more appropriate to use a value that indicates
|
|
|
56fe68 |
+ that the timestamp is unknown, and surface that in the UI. */
|
|
|
56fe68 |
+ mtime = time(NULL);
|
|
|
56fe68 |
+ }
|
|
|
56fe68 |
+
|
|
|
56fe68 |
/*
|
|
|
56fe68 |
* XXX: Should we be setting this here, or relying on prpls to set it?
|
|
|
56fe68 |
*/
|
|
|
56fe68 |
@@ -905,6 +913,14 @@ void serv_got_chat_in(PurpleConnection *
|
|
|
56fe68 |
g_return_if_fail(who != NULL);
|
|
|
56fe68 |
g_return_if_fail(message != NULL);
|
|
|
56fe68 |
|
|
|
56fe68 |
+ if (mtime < 0) {
|
|
|
56fe68 |
+ purple_debug_error("server",
|
|
|
56fe68 |
+ "serv_got_chat_in ignoring negative timestamp\n");
|
|
|
56fe68 |
+ /* TODO: Would be more appropriate to use a value that indicates
|
|
|
56fe68 |
+ that the timestamp is unknown, and surface that in the UI. */
|
|
|
56fe68 |
+ mtime = time(NULL);
|
|
|
56fe68 |
+ }
|
|
|
56fe68 |
+
|
|
|
56fe68 |
for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) {
|
|
|
56fe68 |
conv = (PurpleConversation *)bcs->data;
|
|
|
56fe68 |
|