]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_md: a possible NULL pointer deref was fixed in
authorStefan Eissing <icing@apache.org>
Fri, 22 Apr 2022 08:45:31 +0000 (08:45 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 22 Apr 2022 08:45:31 +0000 (08:45 +0000)
     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

changes-entries/md_timeperiod_null.txt [new file with mode: 0644]
modules/md/md_json.c
modules/md/md_version.h

diff --git a/changes-entries/md_timeperiod_null.txt b/changes-entries/md_timeperiod_null.txt
new file mode 100644 (file)
index 0000000..5beb6c8
--- /dev/null
@@ -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.
index 52187168cd962d4c2f5cfdf61c8a33403c96f343..161b2c791058b59bd75b645863f684cb0be6e111 100644 (file)
@@ -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));
index 699d55107e509b44def1b2917b3a049202329159..3ab7ee3335d572fece17c919715b338e4c8be13e 100644 (file)
@@ -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"