This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
The following commit(s) were added to refs/heads/main by this push:
new 80a96c3d1 Avoid a potential crash when processing OCSP URLs.
80a96c3d1 is described below
commit 80a96c3d12de3d83f47708707e180e6889905f92
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Aug 28 14:48:30 2026 +0100
Avoid a potential crash when processing OCSP URLs.
---
native/src/sslutils.c | 8 ++++----
xdocs/miscellaneous/changelog.xml | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index b7dc71835..999e46c2c 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -583,7 +583,6 @@ static int parse_ocsp_url(unsigned char *asn1, char
***ocsp_urls,
if (!err) {
*ocsp_urls = new_ocsp_urls;
*nocsp_urls = new_nocsp_urls;
- *(*ocsp_urls + *nocsp_urls) = NULL;
if ((ocsp_url = apr_palloc(p, len + 1)) == NULL) {
err = 1;
}
@@ -646,9 +645,10 @@ static int parse_ASN1_Sequence(unsigned char *asn1, char
***ocsp_urls,
return err;
}
-/* the main function that gets the ASN1 encoding string and returns
- a pointer to a NULL terminated "array" of char *, that contains
- the ocsp_urls */
+/*
+ * The main function that gets the ASN1 encoding string and returns a pointer
to an "array" of char *, that contains the
+ * ocsp_urls. The array is not NULL terminated since the length is tracked.
+ */
static char **decode_OCSP_url(ASN1_OCTET_STRING *os, int *numofresponses,
apr_pool_t *p)
{
char **response = NULL;
diff --git a/xdocs/miscellaneous/changelog.xml
b/xdocs/miscellaneous/changelog.xml
index 66d2ba0f7..fdb3906b7 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -78,6 +78,9 @@
<fix>
Make the call to a CertificateVerifier more robust. (markt)
</fix>
+ <fix>
+ Avoid a potential crash when processing OCSP URLs. (markt)
+ </fix>
</changelog>
</section>
<section name="2.0.15" rtext="2026-06-15">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]