]> git.lizzy.rs Git - plan9front.git/commitdiff
libsec: zero name buffer in X509toECpub()
authorcinap_lenrek <cinap_lenrek@felloff.net>
Fri, 10 Feb 2017 20:42:11 +0000 (21:42 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Fri, 10 Feb 2017 20:42:11 +0000 (21:42 +0100)
sys/src/libsec/port/x509.c

index a05d63159938a39c281495c66c68ae97d5fbc6a4..5b99116cc67f5708707159c7526dd2a360067b23 100644 (file)
@@ -2320,6 +2320,9 @@ X509toECpub(uchar *cert, int ncert, char *name, int nname, ECdomain *dom)
        ECpub *pub;
        Bytes *b;
 
+       if(name != nil)
+               memset(name, 0, nname);
+
        b = makebytes(cert, ncert);
        c = decode_cert(b);
        freebytes(b);