mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 19:10:48 +02:00
quic: Fix buffer underflow
This commit is contained in:
committed by
GitHub
parent
0ecc0c5973
commit
fd8772ac3f
@@ -852,6 +852,11 @@ static int wolfSSL_quic_send_internal(WOLFSSL* ssl)
|
||||
rl = (RecordLayerHeader*)output;
|
||||
ato16(rl->length, &rlen);
|
||||
output += RECORD_HEADER_SZ;
|
||||
if (length < RECORD_HEADER_SZ) {
|
||||
WOLFSSL_MSG("WOLFSSL_QUIC_SEND application failed");
|
||||
ret = FWRITE_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
length -= RECORD_HEADER_SZ;
|
||||
ssl->quic.output_rec_remain = rlen;
|
||||
ssl->quic.output_rec_level = ssl->quic.enc_level_write;
|
||||
|
||||
Reference in New Issue
Block a user