Fixed null deref in src->attachments - thanks Thomas :) el_presidente
authorKrista Bennett <krista@pep-project.org>
Mon, 30 Apr 2018 09:34:11 +0200
branchel_presidente
changeset 26576d083c04dd77
parent 2630 5f5f392090b8
Fixed null deref in src->attachments - thanks Thomas :)
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Apr 25 10:47:10 2018 +0200
     1.2 +++ b/src/message_api.c	Mon Apr 30 09:34:11 2018 +0200
     1.3 @@ -1946,7 +1946,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          }