Empty string fail fixed in mime.c Release_2.1 Release_2.1.11
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 19 Jan 2021 16:25:58 +0100
branchRelease_2.1
changeset 5275f6f52234d220
parent 5248 217b4067d60b
child 5276 9a5c18b7a141
child 5279 eef5d0a66d7d
Empty string fail fixed in mime.c
src/mime.c
     1.1 --- a/src/mime.c	Tue Dec 22 17:31:51 2020 +0100
     1.2 +++ b/src/mime.c	Tue Jan 19 16:25:58 2021 +0100
     1.3 @@ -3,6 +3,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 @@ -25,7 +26,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++);