aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2025-02-05 10:51:11 +0100
committerdefault <nobody@localhost>2025-02-05 10:51:11 +0100
commit0da936901283db8c5de5b6470ffd911ac8b300fe (patch)
tree534c5b751dd574311616813904eebc64b015d1a3
parent4842abbfc679495efb5984bfc712ce9d812ed1b5 (diff)
Fixed crash in xs_fcgi_request().
-rw-r--r--xs_fcgi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs_fcgi.h b/xs_fcgi.h
index 870e3e8..0b53dac 100644
--- a/xs_fcgi.h
+++ b/xs_fcgi.h
@@ -173,6 +173,9 @@ xs_dict *xs_fcgi_request(FILE *f, xs_str **payload, int *p_size, int *fcgi_id)
xs *v = xs_str_new_sz((char *)&buf[offset], vsz);
offset += vsz;
+ if (!xs_is_string(k) || !xs_is_string(v))
+ continue;
+
cgi_vars = xs_dict_append(cgi_vars, k, v);
if (strcmp(k, "REQUEST_METHOD") == 0)