diff options
author | default <nobody@localhost> | 2023-10-19 06:47:42 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-10-19 06:47:42 +0200 |
commit | 575a152305f8767ccc0797aee3ddb3d8bcae5756 (patch) | |
tree | ba32c9697e45059800ba64c8b51ad1f7c21ef7d6 /xs_fcgi.h | |
parent | 0ab03a8dffd4519081b1dcfa932a992a33c9bff1 (diff) |
Backport from xs.
Diffstat (limited to 'xs_fcgi.h')
-rw-r--r-- | xs_fcgi.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -222,7 +222,11 @@ xs_dict *xs_fcgi_request(FILE *f, xs_str **payload, int *p_size, int *fcgi_id) b_size += psz; } else { - /* the packet is complete; fill the payload info and finish */ + /* add an asciiz to be able to treat it as a string */ + buf = xs_realloc(buf, _xs_blk_size(b_size + 1)); + buf[b_size] = '\0'; + + /* fill the payload info and finish */ *payload = (xs_str *)buf; *p_size = b_size; |