snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit a63c9c24c1b3f6c46ff1bc7a3428e8f50b4b1318
parent 64b7b66e3bdadde6e6a407da3f336b8a9cff0596
Author: default <nobody@localhost>
Date:   Sun, 25 Sep 2022 21:55:29 +0200

Avoid crashing on empty q_items.

Diffstat:
Mactivitypub.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -341,6 +341,11 @@ void process_queue(snac *snac) xs *q_item = dequeue(snac, fn); char *type; + if (q_item == NULL) { + snac_log(snac, xs_fmt("process_queue q_item error")); + continue; + } + if ((type = xs_dict_get(q_item, "type")) == NULL) type = "output";