sequoia: Don't assume that the caller initializes stext & ssize sync
authorNeal H. Walfield <neal@pep.foundation>
Wed, 20 Mar 2019 18:37:47 +0100
branchsync
changeset 3354e9d5bcbc88f8
parent 3353 821f22f98225
child 3355 dd4033892b54
sequoia: Don't assume that the caller initializes stext & ssize

- In pgp_gpg.c's pgp_sign_only, stext and ssize aren't assumed to be
initialized to NULL. We shouldn't assume this either.
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Wed Mar 20 17:40:18 2019 +0100
     1.2 +++ b/src/pgp_sequoia.c	Wed Mar 20 18:37:47 2019 +0100
     1.3 @@ -1246,6 +1246,8 @@
     1.4      assert(psize);
     1.5      assert(stext);
     1.6      assert(ssize);
     1.7 +    *stext = NULL;
     1.8 +    *ssize = 0;
     1.9  
    1.10      PEP_STATUS status = PEP_STATUS_OK;
    1.11      pgp_error_t err = NULL;