diff options
| author | 2022-12-11 10:33:01 +0100 | |
|---|---|---|
| committer | 2022-12-11 10:33:01 +0100 | |
| commit | aa82e14bc7e7a3770feb23446d1a843d97213ccf (patch) | |
| tree | b4c0758aae4b5fa9a8b0c6282f7e45b2ab57eb9a /xs_httpd.h | |
| parent | Backport from xs. (diff) | |
| download | snac2-aa82e14bc7e7a3770feb23446d1a843d97213ccf.tar.gz snac2-aa82e14bc7e7a3770feb23446d1a843d97213ccf.tar.xz snac2-aa82e14bc7e7a3770feb23446d1a843d97213ccf.zip | |
Backport from xs.
Diffstat (limited to 'xs_httpd.h')
| -rw-r--r-- | xs_httpd.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -131,13 +131,13 @@ d_char *_xs_multipart_form_data(char *payload, int p_size, char *header) | |||
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | /* find the start of the part content */ | 133 | /* find the start of the part content */ |
| 134 | if ((p = xs_memmem(p, p_size - offset, "\r\n\r\n", 4)) == NULL) | 134 | if ((p = xs_memmem(p, p_size - (p - payload), "\r\n\r\n", 4)) == NULL) |
| 135 | break; | 135 | break; |
| 136 | 136 | ||
| 137 | p += 4; | 137 | p += 4; |
| 138 | 138 | ||
| 139 | /* find the next boundary */ | 139 | /* find the next boundary */ |
| 140 | if ((q = xs_memmem(p, p_size - offset, boundary, bsz)) == NULL) | 140 | if ((q = xs_memmem(p, p_size - (p - payload), boundary, bsz)) == NULL) |
| 141 | break; | 141 | break; |
| 142 | 142 | ||
| 143 | po = p - payload; | 143 | po = p - payload; |