diff options
author | default <nobody@localhost> | 2024-01-14 12:19:35 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-14 12:19:35 +0100 |
commit | 7ca08aebd245dc7116113bae97e31881fcc09eb0 (patch) | |
tree | 206997fd305c5a56cf7456b6090e3dabdcd1c2fb /data.c | |
parent | d02116297883d2ff15d7ea58810e915a956a6928 (diff) |
Fixed crashes in command-line options.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1508,6 +1508,13 @@ int actor_get(const char *actor, xs_dict **data) return status; } + /* if the object is corrupted, discard it */ + if (xs_is_null(xs_dict_get(d, "id")) || xs_is_null(xs_dict_get(d, "type"))) { + srv_debug(1, xs_fmt("corrupted actor object %s", actor)); + d = xs_free(d); + return 404; + } + if (data) *data = d; else @@ -2169,7 +2176,7 @@ void enqueue_output_raw(const char *keyid, const char *seckey, qmsg = xs_dict_append(qmsg, "seckey", seckey); /* if it's to be sent right now, bypass the disk queue and post the job */ - if (retries == 0) + if (retries == 0 && p_state != NULL) job_post(qmsg, 0); else { qmsg = _enqueue_put(fn, qmsg); |