summaryrefslogtreecommitdiff
path: root/src/ocsp.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-12-23 10:55:55 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-12-23 10:55:55 +0900
commitb2313918523eaf298fd259ed202230bbb8a411a2 (patch)
treed3cf53d2a57ce8c8ca5de161b8a1cce78beb1e90 /src/ocsp.c
parent9fd74865e44c3af62343386d35d326df9e49161d (diff)
downloadlibksba-b2313918523eaf298fd259ed202230bbb8a411a2.tar.gz
libksba-b2313918523eaf298fd259ed202230bbb8a411a2.tar.bz2
libksba-b2313918523eaf298fd259ed202230bbb8a411a2.zip
Imported Upstream version 1.3.4upstream/1.3.4
Diffstat (limited to 'src/ocsp.c')
-rw-r--r--src/ocsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ocsp.c b/src/ocsp.c
index 85679bb..c053b18 100644
--- a/src/ocsp.c
+++ b/src/ocsp.c
@@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
else if (!(err = _ksba_asntime_to_iso (*buf, ti.length,
ti.tag == TYPE_UTC_TIME, isotime)))
parse_skip (buf, len, &ti);