Fixed null deref in src->attachments - thanks Thomas :) ENGINE-423
authorKrista Bennett <krista@pep-project.org>
Mon, 30 Apr 2018 09:34:11 +0200
branchENGINE-423
changeset 2636a77adb0d87f6
parent 2626 8f319cd5966c
child 2643 ec3bb2ae2fdf
Fixed null deref in src->attachments - thanks Thomas :)
src/message_api.c
     1.1 --- a/src/message_api.c	Tue Apr 24 08:59:21 2018 +0200
     1.2 +++ b/src/message_api.c	Mon Apr 30 09:34:11 2018 +0200
     1.3 @@ -1981,7 +1981,7 @@
     1.4      bloblist_t* old_head = NULL;
     1.5      
     1.6      if (!src->attachments || src->attachments->value == NULL) {
     1.7 -        if (src->attachments->value == NULL) {
     1.8 +        if (src->attachments && src->attachments->value == NULL) {
     1.9              old_head = src->attachments;
    1.10              src->attachments = NULL;
    1.11          }