diff options
author | Matt Caswell <matt@openssl.org> | 2023-07-27 15:33:04 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-08-02 15:07:07 +0100 |
commit | 747b51f48338e3b7e53d0b7a87002edefc7e8439 (patch) | |
tree | 457b08b02f4e7d10d56646e305572b9836130e64 /util | |
parent | c31f06120fa8411da3cd779dfe881325204745ac (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.c | 10 |
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) |