]> git.ipfire.org Git - thirdparty/gnutls.git/commit
lib/x509: use common routine for parsing data version
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Thu, 12 Mar 2020 09:56:37 +0000 (12:56 +0300)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Thu, 12 Mar 2020 16:47:22 +0000 (19:47 +0300)
commit6ebfbda5fa424a1462c823bc8dd94f8c3d792bef
tree4dba12483be80a05e381a083fcb33076103d0803
parent6df0dab742b4ee5bd3fa55680657326305bde8cc
lib/x509: use common routine for parsing data version

OSS Fuzzer noted an issue in parsing (incorrect) CRL files with
zero-length version field. Certificate parser does not have this issue,
while CRL and OCSP Request and Response parsers shows this problem. To
remove code duplication extract common function and use it from all four
parsers.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
fuzz/gnutls_x509_crl_parser_fuzzer.repro/698e01fdc3f9a4c402424302768da75f2464a63f [new file with mode: 0644]
lib/x509/common.c
lib/x509/common.h
lib/x509/crl.c
lib/x509/ocsp.c
lib/x509/output.c
lib/x509/x509.c
tests/cert-tests/data/crl-demo3.pem