diff options
| author | 2023-05-04 06:27:13 +0200 | |
|---|---|---|
| committer | 2023-05-04 06:27:13 +0200 | |
| commit | a9f0f2f695d653a2ca58057837fae6b8bc4dc13f (patch) | |
| tree | 34e06cb1b1e03ed3ac9966218fd71f97f80dec81 | |
| parent | Updated documentation. (diff) | |
| download | snac2-a9f0f2f695d653a2ca58057837fae6b8bc4dc13f.tar.gz snac2-a9f0f2f695d653a2ca58057837fae6b8bc4dc13f.tar.xz snac2-a9f0f2f695d653a2ca58057837fae6b8bc4dc13f.zip | |
Avoid crash in optional mastoapi argument.
| -rw-r--r-- | mastoapi.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -1569,6 +1569,9 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 1569 | if (xs_is_null(media_ids)) | 1569 | if (xs_is_null(media_ids)) |
| 1570 | media_ids = xs_dict_get(args, "media_ids[]"); | 1570 | media_ids = xs_dict_get(args, "media_ids[]"); |
| 1571 | 1571 | ||
| 1572 | if (xs_is_null(visibility)) | ||
| 1573 | visibility = "public"; | ||
| 1574 | |||
| 1572 | xs *attach_list = xs_list_new(); | 1575 | xs *attach_list = xs_list_new(); |
| 1573 | xs *irt = NULL; | 1576 | xs *irt = NULL; |
| 1574 | 1577 | ||