diff options
| author | default <nobody@localhost> | 2024-11-07 23:23:10 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2024-11-07 23:23:10 +0100 |
| commit | cf980ba95b6665aff7d3cf55a88ce1e0b90c4d03 (patch) | |
| tree | 87b7ae3576e765f5f0e835571a09fa7e542c2aa8 | |
| parent | b2555fb6b92a984b182d56998608b66f19e9ed91 (diff) | |
Fixed crash in posts from the links browser.
| -rw-r--r-- | xs_url.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -196,7 +196,7 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea if (fn != NULL) { /* p_var value is a list */ /* if filename has no extension and content-type is image, attach extension to the filename */ - if (strchr(fn, '.') == NULL && xs_startswith(ct, "image/")) { + if (strchr(fn, '.') == NULL && ct && xs_startswith(ct, "image/")) { char *ext = strchr(ct, '/'); ext++; fn = xs_str_cat(xs_str_new(""), fn, ".", ext); |