aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-02-23 06:49:12 +0100
committergrunfink <grunfink@comam.es>2026-02-23 06:49:12 +0100
commit2828f1aa5964ff586b5dfac5e5fa2c29309c8ad3 (patch)
tree3825433d313601ce08940d73b3627673c1438746
parent57355092e983886f6ad064b81ae07a6e718f5938 (diff)
Fixed parsing error in xs_multipart_form_data().
-rw-r--r--xs_url.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs_url.h b/xs_url.h
index 56d6d9d..ef35a4b 100644
--- a/xs_url.h
+++ b/xs_url.h
@@ -289,6 +289,9 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea
po = p - payload;
ps = q - p - 2; /* - 2 because the final \r\n */
+ if (ps <= 0)
+ break;
+
/* is it a filename? */
if (fn != NULL) {
/* p_var value is a list */