diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-22 18:39:48 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-22 18:39:48 +0200 |
commit | 2c4d3dd510a806344e4a3c6507d7f397a68c980c (patch) | |
tree | 2ef2f87fd4974fc89bbdafb8fa65de448beda50f | |
parent | c3e1c158f62458f16e5b538f188bad14844d277d (diff) | |
download | plan9front-2c4d3dd510a806344e4a3c6507d7f397a68c980c.tar.xz |
libsec: make sure Elem is zero initialized so freevalfields() wont cause accidents
-rw-r--r-- | sys/src/libsec/port/x509.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/libsec/port/x509.c b/sys/src/libsec/port/x509.c index dbad83bf7..b70ed2689 100644 --- a/sys/src/libsec/port/x509.c +++ b/sys/src/libsec/port/x509.c @@ -2213,6 +2213,7 @@ verify_digestinfo(uchar *sig, int siglen, RSApub *pk, uchar *pdigest, int *psiga char *err; el = nil; + memset(&e, 0, sizeof(e)); buflen = pkcs1decryptsignature(sig, siglen, pk, &buf); if(buflen < 0 || decode(buf, buflen, &e) != ASN_OK || !is_seq(&e, &el) || elistlen(el) != 2 || !is_octetstring(&el->tl->hd, &digest)) { |