about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-07-08 16:33:58 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-07-08 16:36:05 +0200
commit7af85d0fe0fdebb48928385e2afacbdac91bb420 (patch)
tree7e51dbfe3d23ef6d94f93d9177e92a54c7accd47 /src/config
parentb3bb62dcbdac29ebe1669419a86da060d5be619b (diff)
downloadprofani-tty-7af85d0fe0fdebb48928385e2afacbdac91bb420.tar.gz
Fix double free in omemo_start_device_session_handle_bundle()
omemo_key_free() was called to free the key.
It free the key->data too. But in same cases this was not set  yet. So
we need to set the data to NULL (or use calloc) at initialization so
that omemo_key_free() only frees it if it was actually allocated.

Regards https://github.com/profanity-im/profanity/issues/1148
Diffstat (limited to 'src/config')
0 files changed, 0 insertions, 0 deletions
> 7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26






                                                         
                                                     

                                                 











                                                                        


                                                                               
      
#ifndef COMMON_MOCKS_H
#define COMMON_MOCKS_H

#include "xmpp/xmpp.h"

void mock_connection_status(jabber_conn_status_t status);
void mock_connection_account_name(char *name);
void mock_connection_presence_message(char *message);
void expect_room_list_request(char *conf_server);

void mock_jabber_connect_with_details(void);
void jabber_connect_with_username_password_expect_and_return(char *jid,
    char *password, jabber_conn_status_t result);
void jabber_connect_with_altdomain_expect_and_return(char *altdomain,
    jabber_conn_status_t result);
void jabber_connect_with_details_return(jabber_conn_status_t result);

void mock_jabber_connect_with_account(void);
void jabber_connect_with_account_expect_and_return(ProfAccount *account,
    jabber_conn_status_t result);
void jabber_connect_with_account_return(jabber_conn_status_t result);

void mock_presence_update(void);
void presence_update_expect(resource_presence_t presence, char *msg, int idle);

#endif