fix #93 : assert without if in message_api.c: copy_fields()
authorEdouard Tisserant
Tue, 12 Jul 2016 12:07:46 +0200
changeset 8403d5e68bfc548
parent 839 d2740d2c67b3
child 841 bb25b36f52d6
fix #93 : assert without if in message_api.c: copy_fields()
src/message_api.c
     1.1 --- a/src/message_api.c	Mon Jul 11 18:15:09 2016 +0200
     1.2 +++ b/src/message_api.c	Tue Jul 12 12:07:46 2016 +0200
     1.3 @@ -169,6 +169,9 @@
     1.4      assert(dst);
     1.5      assert(src);
     1.6  
     1.7 +    if(!(dst && src))
     1.8 +        return PEP_ILLEGAL_VALUE;
     1.9 +
    1.10      free_timestamp(dst->sent);
    1.11      dst->sent = NULL;
    1.12      if (src->sent) {