snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 575a152305f8767ccc0797aee3ddb3d8bcae5756
parent 0ab03a8dffd4519081b1dcfa932a992a33c9bff1
Author: default <nobody@localhost>
Date:   Thu, 19 Oct 2023 06:47:42 +0200

Backport from xs.

Diffstat:
Mxs_fcgi.h | 6+++++-
Mxs_version.h | 2+-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xs_fcgi.h b/xs_fcgi.h @@ -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; diff --git a/xs_version.h b/xs_version.h @@ -1 +1 @@ -/* b109eea00ddc0765929e36ed1ca6f3f697262bb2 */ +/* 4e5fe7e454d056206a6515e5c10f71d2d07aa0ba */