Empty string fail fixed in mime.c default
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 19 Jan 2021 16:25:58 +0100
changeset 52783b02c89d6133
parent 5274 a19b4c8c033d
child 5281 2eeac2d5d012
Empty string fail fixed in mime.c
src/mime.c
     1.1 --- a/src/mime.c	Mon Jan 18 21:17:51 2021 +0100
     1.2 +++ b/src/mime.c	Tue Jan 19 16:25:58 2021 +0100
     1.3 @@ -6,6 +6,7 @@
     1.4  
     1.5  #define _EXPORT_PEP_ENGINE_DLL
     1.6  #include "mime.h"
     1.7 +#include "pEp_internal.h"
     1.8  
     1.9  #include <string.h>
    1.10  #include <stdlib.h>
    1.11 @@ -38,7 +39,7 @@
    1.12  
    1.13  DYNAMIC_API bool is_PGP_message_text(const char *text)
    1.14  {
    1.15 -    if (text == NULL)
    1.16 +    if (EMPTYSTR(text))
    1.17          return false;
    1.18  
    1.19      for (; *text && is_whitespace(*text); text++);