Forgotten sanity checks import_own_key
authorEdouard Tisserant
Wed, 15 Jun 2016 13:31:28 +0200
branchimport_own_key
changeset 7397630e3ed6486
parent 738 51a8af1ef550
child 740 3b1eacc35400
Forgotten sanity checks
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Jun 15 12:29:59 2016 +0200
     1.2 +++ b/src/message_api.c	Wed Jun 15 13:31:28 2016 +0200
     1.3 @@ -1198,10 +1198,13 @@
     1.4      assert(dst);
     1.5      assert(keylist);
     1.6      assert(color);
     1.7 +    assert(flags);
     1.8  
     1.9 -    if (!(session && src && dst && keylist && color))
    1.10 +    if (!(session && src && dst && keylist && color && flags))
    1.11          return PEP_ILLEGAL_VALUE;
    1.12  
    1.13 +    *flags = 0;
    1.14 +
    1.15      // Private key in unencrypted mail are ignored -> NULL
    1.16      bool imported_keys = import_attached_keys(session, src, NULL);
    1.17