ENGINE-362, possibly: bug in empty recip lists may be causing this bug, so we fixed the identity_list_dup problem here.
authorKrista Bennett <krista@pep-project.org>
Tue, 20 Feb 2018 09:57:16 +0100
changeset 2524aa720ce48018
parent 2522 70df192d5904
child 2525 67f62c556060
ENGINE-362, possibly: bug in empty recip lists may be causing this bug, so we fixed the identity_list_dup problem here.
src/identity_list.c
src/pEpEngine.c
src/stringpair.c
test/identity_list_test.cc
     1.1 --- a/src/identity_list.c	Mon Feb 19 15:34:10 2018 +0100
     1.2 +++ b/src/identity_list.c	Tue Feb 20 09:57:16 2018 +0100
     1.3 @@ -27,6 +27,9 @@
     1.4      if (src == NULL)
     1.5          return NULL;
     1.6  
     1.7 +    if (src->ident == NULL)
     1.8 +        return new_identity_list(NULL);
     1.9 +        
    1.10      pEp_identity *_ident = identity_dup(src->ident);
    1.11      if (_ident == NULL)
    1.12          return NULL;
     2.1 --- a/src/pEpEngine.c	Mon Feb 19 15:34:10 2018 +0100
     2.2 +++ b/src/pEpEngine.c	Tue Feb 20 09:57:16 2018 +0100
     2.3 @@ -1457,7 +1457,7 @@
     2.4                  sqlite3_finalize(session->delete_mistrusted_key);
     2.5              if (session->is_mistrusted_key)
     2.6                  sqlite3_finalize(session->is_mistrusted_key);
     2.7 -
     2.8 +        
     2.9              if (session->db)
    2.10                  sqlite3_close_v2(session->db);
    2.11              if (session->system_db)
     3.1 --- a/src/stringpair.c	Mon Feb 19 15:34:10 2018 +0100
     3.2 +++ b/src/stringpair.c	Tue Feb 20 09:57:16 2018 +0100
     3.3 @@ -208,4 +208,3 @@
     3.4  
     3.5      return NULL;
     3.6  }
     3.7 -
     4.1 --- a/test/identity_list_test.cc	Mon Feb 19 15:34:10 2018 +0100
     4.2 +++ b/test/identity_list_test.cc	Tue Feb 20 09:57:16 2018 +0100
     4.3 @@ -172,4 +172,3 @@
     4.4      
     4.5      return 0;
     4.6  }
     4.7 -