Skip to content

Commit

Permalink
* A possible NULL pointer deref was fixed in the JSON code for
Browse files Browse the repository at this point in the history
   persisting time periods (start+end). Fixes #282.
   Thanks to @marcstern for finding this.
  • Loading branch information
Stefan Eissing committed Apr 22, 2022
1 parent 54bbcc5 commit 0d87776
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* A possible NULL pointer deref was fixed in the JSON code for
persisting time periods (start+end). Fixes #282.
Thanks to @marcstern for finding this.

v2.4.12
----------------------------------------------------------------------------------------------------
* Implement full auto status ("key: value" type status output).
Expand Down
2 changes: 1 addition & 1 deletion src/md_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 0d87776

Please sign in to comment.