commit 2828f1a
grunfink
·
2026-02-23 05:49:12 +0000 UTC
parent 5735509
Fixed parsing error in xs_multipart_form_data().
1 files changed,
+3,
-0
M
xs_url.h
M
xs_url.h
+3,
-0
1@@ -289,6 +289,9 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea
2 po = p - payload;
3 ps = q - p - 2; /* - 2 because the final \r\n */
4
5+ if (ps <= 0)
6+ break;
7+
8 /* is it a filename? */
9 if (fn != NULL) {
10 /* p_var value is a list */