summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-07-27 15:33:04 +0100
committerMatt Caswell <matt@openssl.org>2023-08-02 15:07:07 +0100
commit747b51f48338e3b7e53d0b7a87002edefc7e8439 (patch)
tree457b08b02f4e7d10d56646e305572b9836130e64 /util
parentc31f06120fa8411da3cd779dfe881325204745ac (diff)
Correctly keep track of where we are in the quicserver request buffer
If the request comes in in multiple chunks properly keep tract of where we are. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21578)
Diffstat (limited to 'util')
-rw-r--r--util/quicserver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/quicserver.c b/util/quicserver.c
index 42adee531c..d23d4f4166 100644
--- a/util/quicserver.c
+++ b/util/quicserver.c
@@ -210,11 +210,11 @@ int main(int argc, char *argv[])
ossl_quic_tserver_tick(qtserv);
- if (ossl_quic_tserver_read(qtserv, 0, reqbuf, sizeof(reqbuf),
- &numbytes)) {
- if (numbytes > 0) {
- fwrite(reqbuf, 1, numbytes, stdout);
- }
+ if (ossl_quic_tserver_read(qtserv, 0, reqbuf + reqbytes,
+ sizeof(reqbuf) - reqbytes,
+ &numbytes)) {
+ if (numbytes > 0)
+ fwrite(reqbuf + reqbytes, 1, numbytes, stdout);
reqbytes += numbytes;
}
} while (reqbytes < sizeof(reqterm)