add more assertions ENGINE-198
authorRoker <roker@pep-project.org>
Tue, 02 May 2017 08:48:35 +0200
branchENGINE-198
changeset 17415bd49bd73192
parent 1740 961f325d7a85
child 1743 67f9eecd5535
add more assertions
src/message_api.c
     1.1 --- a/src/message_api.c	Tue May 02 08:41:57 2017 +0200
     1.2 +++ b/src/message_api.c	Tue May 02 08:48:35 2017 +0200
     1.3 @@ -2549,6 +2549,12 @@
     1.4      PEP_decrypt_flags_t *flags
     1.5  )
     1.6  {
     1.7 +    assert(mimetext);
     1.8 +    assert(mime_plaintext);
     1.9 +    assert(keylist);
    1.10 +    assert(rating);
    1.11 +    assert(flags);
    1.12 +
    1.13      PEP_STATUS status = PEP_STATUS_OK;
    1.14      message* tmp_msg = NULL;
    1.15      message* dec_msg = NULL;
    1.16 @@ -2569,6 +2575,8 @@
    1.17          goto pep_error;
    1.18      }
    1.19  
    1.20 +    assert(dec_msg);
    1.21 +    
    1.22      status = mime_encode_message(dec_msg, false, mime_plaintext);
    1.23  
    1.24      if (status == PEP_STATUS_OK)