diff options
| author | 2023-10-19 06:47:42 +0200 | |
|---|---|---|
| committer | 2023-10-19 06:47:42 +0200 | |
| commit | 575a152305f8767ccc0797aee3ddb3d8bcae5756 (patch) | |
| tree | ba32c9697e45059800ba64c8b51ad1f7c21ef7d6 | |
| parent | Updated documentation. (diff) | |
| download | snac2-575a152305f8767ccc0797aee3ddb3d8bcae5756.tar.gz snac2-575a152305f8767ccc0797aee3ddb3d8bcae5756.tar.xz snac2-575a152305f8767ccc0797aee3ddb3d8bcae5756.zip | |
Backport from xs.
| -rw-r--r-- | xs_fcgi.h | 6 | ||||
| -rw-r--r-- | xs_version.h | 2 |
2 files changed, 6 insertions, 2 deletions
| @@ -222,7 +222,11 @@ xs_dict *xs_fcgi_request(FILE *f, xs_str **payload, int *p_size, int *fcgi_id) | |||
| 222 | b_size += psz; | 222 | b_size += psz; |
| 223 | } | 223 | } |
| 224 | else { | 224 | else { |
| 225 | /* the packet is complete; fill the payload info and finish */ | 225 | /* add an asciiz to be able to treat it as a string */ |
| 226 | buf = xs_realloc(buf, _xs_blk_size(b_size + 1)); | ||
| 227 | buf[b_size] = '\0'; | ||
| 228 | |||
| 229 | /* fill the payload info and finish */ | ||
| 226 | *payload = (xs_str *)buf; | 230 | *payload = (xs_str *)buf; |
| 227 | *p_size = b_size; | 231 | *p_size = b_size; |
| 228 | 232 | ||
diff --git a/xs_version.h b/xs_version.h index 5fa20dd..0861699 100644 --- a/xs_version.h +++ b/xs_version.h | |||
| @@ -1 +1 @@ | |||
| /* b109eea00ddc0765929e36ed1ca6f3f697262bb2 */ | /* 4e5fe7e454d056206a6515e5c10f71d2d07aa0ba */ | ||