Accepting request 924951 from network:pidgin

OBS-URL: https://build.opensuse.org/request/show/924951
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin?expand=0&rev=140
This commit is contained in:
Dominique Leuenberger 2021-10-16 20:46:56 +00:00 committed by Git OBS Bridge
commit 9d40c229f7
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,48 @@
# HG changeset patch
# User Gary Kramlich <grim@reaperworld.com>
# Date 1632457638 18000
# Thu Sep 23 23:27:18 2021 -0500
# Branch release-2.x.y
# Node ID 740dafa46e5ea6a00f031ec39c76d38ad1b11172
# Parent e91465803c0e9e21de809dfcf8f8ab0f547cc269
Fix a double free in jabber/message.c and silence a warning
JabberBuddyResource is handled internally, but it's free function, which is static, does in fact free the thread_id as well.
Testing Done:
Compiled
Bugs closed: PIDGIN-17547
Reviewed at https://reviews.imfreedom.org/r/932/
diff --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c
--- a/libpurple/protocols/jabber/message.c
+++ b/libpurple/protocols/jabber/message.c
@@ -798,7 +798,7 @@
case JABBER_MESSAGE_OTHER:
purple_debug_info("jabber",
"Received message of unknown type: %s\n", type);
- /* Fall-through is intentional */
+ /* FALL-THROUGH */
case JABBER_MESSAGE_NORMAL:
case JABBER_MESSAGE_CHAT:
handle_chat(jm);
@@ -1179,12 +1179,13 @@
jm->id = jabber_get_next_id(jm->js);
if(jbr) {
- if(jbr->thread_id)
- jm->thread_id = jbr->thread_id;
+ if(jbr->thread_id) {
+ jm->thread_id = g_strdup(jbr->thread_id);
+ }
- if (jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED)
+ if (jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED) {
jm->chat_state = JM_STATE_NONE;
- else {
+ } else {
/* if(JABBER_CHAT_STATES_UNKNOWN == jbr->chat_states)
jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; */
}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 12 16:44:39 UTC 2021 - Lukas Müller <expeehaa@outlook.com>
- Add pidgin-fix-double-free-crash.patch: fix double free crash
-------------------------------------------------------------------
Mon Sep 20 20:19:21 UTC 2021 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -38,6 +38,8 @@ Patch2: pidgin-fix-perl-build.patch
Patch3: pidgin-use-default-alsa.patch
# PATCH-FIX-OPENSUSE pidgin-always-enable-intltool.patch mgorse@suse.com -- always enable intltool, needed for autoconf 2.71.
Patch4: pidgin-always-enable-intltool.patch
# Fix a crash due to a freed double. Patch was taken from upstream and will be included in version 2.14.8.
Patch5: pidgin-fix-double-free-crash.patch
BuildRequires: ca-certificates-mozilla
BuildRequires: doxygen
BuildRequires: fdupes
@ -220,6 +222,7 @@ scripts and plugins.
%patch3 -p1
%endif
%patch4 -p1
%patch5 -p1
cp -f %{SOURCE3} %{name}-prefs.xml