snac2

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

commit a9f0f2f695d653a2ca58057837fae6b8bc4dc13f
parent cf8d91147b1a0233ba5d3d98a8806bd2a87c222d
Author: default <nobody@localhost>
Date:   Thu,  4 May 2023 06:27:13 +0200

Avoid crash in optional mastoapi argument.

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

diff --git a/mastoapi.c b/mastoapi.c @@ -1569,6 +1569,9 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, if (xs_is_null(media_ids)) media_ids = xs_dict_get(args, "media_ids[]"); + if (xs_is_null(visibility)) + visibility = "public"; + xs *attach_list = xs_list_new(); xs *irt = NULL;