ENGINE-72 bad use of strlcpy lengths. Will check the rest. This should unblock Dean, and only impacted PGP inline. Ready for review.
authorKrista Grothoff <krista@pep-project.org>
Thu, 04 Aug 2016 20:27:40 +0200
changeset 974c9a5b9b58f2c
parent 971 158b15e9d626
child 975 f89b6db91780
ENGINE-72 bad use of strlcpy lengths. Will check the rest. This should unblock Dean, and only impacted PGP inline. Ready for review.
src/message_api.c
src/mime.c
     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);
     2.1 --- a/src/mime.c	Wed Aug 03 08:33:41 2016 -0700
     2.2 +++ b/src/mime.c	Thu Aug 04 20:27:40 2016 +0200
     2.3 @@ -1280,6 +1280,8 @@
     2.4                  }
     2.5                  free(_longmsg);
     2.6                  _longmsg = _text;
     2.7 +                // FIXME: KG - This is where we have the text we want to deal with.
     2.8 +                // Now we need to strip sigs and process them.
     2.9              }
    2.10          }
    2.11      }