mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
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)
This commit is contained in:
parent
c31f06120f
commit
747b51f483
@ -210,11 +210,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
ossl_quic_tserver_tick(qtserv);
|
ossl_quic_tserver_tick(qtserv);
|
||||||
|
|
||||||
if (ossl_quic_tserver_read(qtserv, 0, reqbuf, sizeof(reqbuf),
|
if (ossl_quic_tserver_read(qtserv, 0, reqbuf + reqbytes,
|
||||||
&numbytes)) {
|
sizeof(reqbuf) - reqbytes,
|
||||||
if (numbytes > 0) {
|
&numbytes)) {
|
||||||
fwrite(reqbuf, 1, numbytes, stdout);
|
if (numbytes > 0)
|
||||||
}
|
fwrite(reqbuf + reqbytes, 1, numbytes, stdout);
|
||||||
reqbytes += numbytes;
|
reqbytes += numbytes;
|
||||||
}
|
}
|
||||||
} while (reqbytes < sizeof(reqterm)
|
} while (reqbytes < sizeof(reqterm)
|
||||||
|
Loading…
Reference in New Issue
Block a user