From: Stefan Eissing Date: Fri, 22 Apr 2022 08:45:31 +0000 (+0000) Subject: *) mod_md: a possible NULL pointer deref was fixed in X-Git-Tag: 2.5.0-alpha2-ci-test-only~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=533a895c1f52c351ae1d338df32236c0a642442b;p=thirdparty%2Fapache%2Fhttpd.git *) mod_md: a possible NULL pointer deref was fixed in the JSON code for persisting time periods (start+end). Fixes #282 on mod_md's github. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900145 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/md_timeperiod_null.txt b/changes-entries/md_timeperiod_null.txt new file mode 100644 index 00000000000..5beb6c8f52d --- /dev/null +++ b/changes-entries/md_timeperiod_null.txt @@ -0,0 +1,4 @@ + *) mod_md: a possible NULL pointer deref was fixed in + the JSON code for persisting time periods (start+end). + Fixes #282 on mod_md's github. + Thanks to @marcstern for finding this. diff --git a/modules/md/md_json.c b/modules/md/md_json.c index 52187168cd9..161b2c79105 100644 --- a/modules/md/md_json.c +++ b/modules/md/md_json.c @@ -1264,7 +1264,7 @@ apr_status_t md_json_set_timeperiod(const md_timeperiod_t *tp, md_json_t *json, const char *key; apr_status_t rv; - if (!tp || tp->start || tp->end) { + if (tp && tp->start && tp->end) { jn = json_object(); apr_rfc822_date(ts, tp->start); json_object_set_new(jn, "from", json_string(ts)); diff --git a/modules/md/md_version.h b/modules/md/md_version.h index 699d55107e5..3ab7ee3335d 100644 --- a/modules/md/md_version.h +++ b/modules/md/md_version.h @@ -27,7 +27,7 @@ * @macro * Version number of the md module as c string */ -#define MOD_MD_VERSION "2.4.12" +#define MOD_MD_VERSION "2.4.13" /** * @macro @@ -35,7 +35,7 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define MOD_MD_VERSION_NUM 0x02040c +#define MOD_MD_VERSION_NUM 0x02040d #define MD_ACME_DEF_URL "https://acme-v02.api.letsencrypt.org/directory"