diff options
| author | default <nobody@localhost> | 2023-12-18 13:24:07 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2023-12-18 13:24:07 +0100 |
| commit | be3e5c96182974e569b58699aee18af71f86e13f (patch) | |
| tree | 453bdbbf48628429dd76323fc24ef071209e6137 /httpd.c | |
| parent | 52f27123bbd6cf8101a86618c6aa04f52a07543a (diff) | |
Added some crash checks.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -382,7 +382,7 @@ void httpd_connection(FILE *f) srv_archive("RECV", NULL, req, payload, p_size, status, headers, body, b_size); /* JSON validation check */ - if (strcmp(ctype, "application/json") == 0) { + if (!xs_is_null(body) && strcmp(ctype, "application/json") == 0) { xs *j = xs_json_loads(body); if (j == NULL) { |