quic: Fix buffer underflow

This commit is contained in:
Loganaden Velvindron
2026-07-03 03:57:58 +04:00
committed by GitHub
parent 0ecc0c5973
commit fd8772ac3f
+5
View File
@@ -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;