src/message_api.c
changeset 974 c9a5b9b58f2c
parent 961 1de966460004
child 975 f89b6db91780
     1.1 --- a/src/message_api.c	Wed Aug 03 08:33:41 2016 -0700
     1.2 +++ b/src/message_api.c	Thu Aug 04 20:27:40 2016 +0200
     1.3 @@ -536,8 +536,8 @@
     1.4                          if (filename == NULL)
     1.5                              goto enomem;
     1.6  
     1.7 -                        strlcpy(filename, _s->filename, len);
     1.8 -                        strlcpy(filename + len, ".pgp", 5);
     1.9 +                        strlcpy(filename, _s->filename, len + 5);
    1.10 +                        strlcpy(filename + len, ".pgp", len + 5);
    1.11                      }
    1.12                      else {
    1.13                          filename = calloc(1, 20);