shithub: riscv

Download patch

ref: 6840a9aafdd1356152765d2f9e0bd980fbc6cd6f
parent: fb2abc2a0483bc1ffa10f341b6d2f665a5e03bca
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 10 16:42:11 EST 2017

libsec: zero name buffer in X509toECpub()

--- a/sys/src/libsec/port/x509.c
+++ b/sys/src/libsec/port/x509.c
@@ -2320,6 +2320,9 @@
 	ECpub *pub;
 	Bytes *b;
 
+	if(name != nil)
+		memset(name, 0, nname);
+
 	b = makebytes(cert, ncert);
 	c = decode_cert(b);
 	freebytes(b);