--- a/libpurple/protocols/jabber/auth_scram.c Wed Jun 02 04:17:25 2021 -0500
+++ b/libpurple/protocols/jabber/auth_scram.c Wed Jun 02 17:59:31 2021 -0500
@@ -142,6 +142,13 @@
guchar *client_key, *stored_key, *client_signature, *server_key;
+ salted_password = jabber_scram_hi(data->hash, pass, salt, iterations); + memset(pass->str, 0, pass->allocated_len); + g_string_free(pass, TRUE); client_key = g_new0(guchar, hash_len);
stored_key = g_new0(guchar, hash_len);
client_signature = g_new0(guchar, hash_len);
@@ -152,14 +159,6 @@
data->server_signature = g_string_sized_new(hash_len);
data->server_signature->len = hash_len;
- salted_password = jabber_scram_hi(data->hash, pass, salt, iterations);
- memset(pass->str, 0, pass->allocated_len);
- g_string_free(pass, TRUE);
/* client_key = HMAC(salted_password, "Client Key") */
jabber_scram_hmac(data->hash, client_key, salted_password, "Client Key");
/* server_key = HMAC(salted_password, "Server Key") */
--- a/libpurple/protocols/jabber/google/google_session.c Wed Jun 02 04:17:25 2021 -0500
+++ b/libpurple/protocols/jabber/google/google_session.c Wed Jun 02 17:59:31 2021 -0500
@@ -562,6 +562,7 @@
(GoogleAVSessionData *) session->session_data;
if (session->state != UNINIT) {
+ google_session_destroy(session); purple_debug_error("jabber", "Received initiate for active session.\n");
@@ -574,6 +575,7 @@
else if (purple_strequal(xmlns, NS_GOOGLE_SESSION_VIDEO))
session_data->video = TRUE;
+ google_session_destroy(session); purple_debug_error("jabber", "Received initiate with "
"invalid namespace %s.\n", xmlns);
--- a/libpurple/protocols/jabber/presence.c Wed Jun 02 04:17:25 2021 -0500
+++ b/libpurple/protocols/jabber/presence.c Wed Jun 02 17:59:31 2021 -0500
@@ -339,7 +339,7 @@
/* if we are idle and not offline, include idle */
- if (js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) {
+ if (js != NULL && js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) { xmlnode *query = xmlnode_new_child(presence, "query");
g_snprintf(seconds, 10, "%d", (int) (time(NULL) - js->idle));
@@ -350,7 +350,10 @@
- jabber_caps_calculate_own_hash(js);
+ jabber_caps_calculate_own_hash(js); c = xmlnode_new_child(presence, "c");
xmlnode_set_namespace(c, "http://jabber.org/protocol/caps");