ENGINE-588 - put in a strlen, but seems like iOS has a different strstr impl? Dirk, check this out in the AM. sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 04 Jul 2019 21:34:15 +0200
branchsync
changeset 3898af2d664f4eb6
parent 3889 20e17006f286
child 3899 f37db118e0b0
ENGINE-588 - put in a strlen, but seems like iOS has a different strstr impl? Dirk, check this out in the AM.
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Fri Jun 28 17:41:02 2019 +0200
     1.2 +++ b/src/pgp_sequoia.c	Thu Jul 04 21:34:15 2019 +0200
     1.3 @@ -1860,6 +1860,8 @@
     1.4      const char* pgp_begin = "-----BEGIN PGP";
     1.5      size_t prefix_len = strlen(pgp_begin);
     1.6      while (key_data) {
     1.7 +        if (key_data[0] == '\0' || strlen(key_data) <= prefix_len)
     1.8 +            break;
     1.9          key_data = strstr(key_data, pgp_begin);
    1.10          if (key_data) {
    1.11              retval++;