This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
The following commit(s) were added to refs/heads/1.3.x by this push:
new cbfdf0e47 Avoid a potential crash when processing OCSP URLs.
cbfdf0e47 is described below
commit cbfdf0e478961cd08a66960dd02142fcc92f18ea
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 fb5ee41c9..70b328039 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -650,7 +650,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;
}
@@ -713,9 +712,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 808cb663e..15735566e 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -69,6 +69,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="1.3.8" rtext="2026-06-15">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]