Check for null fieldlist (response to libetpan changes)
authorKrista Bennett <krista@pep-project.org>
Mon, 28 May 2018 10:04:27 +0200
changeset 2698f6f35182b3e6
parent 2694 dbbf5b09f2ea
child 2699 dd68d5551e11
Check for null fieldlist (response to libetpan changes)
src/mime.c
     1.1 --- a/src/mime.c	Thu May 24 11:07:05 2018 +0200
     1.2 +++ b/src/mime.c	Mon May 28 10:04:27 2018 +0200
     1.3 @@ -1153,8 +1153,12 @@
     1.4      clistiter *cur;
     1.5      size_t index;
     1.6      int r;
     1.7 +    
     1.8      stringpair_list_t *opt = msg->opt_fields;
     1.9  
    1.10 +    if (!fieldlist)
    1.11 +        return PEP_STATUS_OK;
    1.12 +        
    1.13      for (cur = clist_begin(fieldlist); cur != NULL; cur = clist_next(cur)) {
    1.14          _field = clist_content(cur);
    1.15  
    1.16 @@ -1342,7 +1346,7 @@
    1.17                  break;
    1.18          }
    1.19      }
    1.20 -
    1.21 +    
    1.22      return PEP_STATUS_OK;
    1.23  
    1.24  enomem:
    1.25 @@ -1508,7 +1512,6 @@
    1.26                  struct mailmime *part= clist_content(cur);
    1.27                  if (part == NULL)
    1.28                      return PEP_ILLEGAL_VALUE;
    1.29 -
    1.30                  status = interpret_MIME(part, msg);
    1.31                  if (status != PEP_STATUS_OK)
    1.32                      return status;