* ha_quic_ossl_crypto_recv_rcd()/qc_ssl_provide_all_quic_data().
* TODO implement proper support for CRYPTO wrapping.
*/
- if (ncbmb_head(ncbuf) + data >= ncbmb_wrap(ncbuf)) {
+ if (ncbmb_head(ncbuf) + data > ncbmb_wrap(ncbuf)) {
TRACE_ERROR("unsupported wrapping CRYPTO frames", QUIC_EV_CONN_PRSHPKT, qc);
COUNT("connection closed on unsupported wrapping CRYPTO content");
quic_set_connection_close(qc, quic_err_transport(QC_ERR_CRYPTO_BUFFER_EXCEEDED));
/* <ncbuf> must not be released at this time. */
cdata = (const unsigned char *)ncbmb_head(ncbuf);
/* Currently wrapping CRYPTO content is not supported and rejected on frame reception. */
- BUG_ON(cdata + data >= (const unsigned char *)ncbmb_wrap(ncbuf));
+ BUG_ON(cdata + data > (const unsigned char *)ncbmb_wrap(ncbuf));
cstream->rx.offset += data;
TRACE_DEVEL("buffered crypto data were provided to TLS stack",
while ((data = ncbmb_data(ncbuf, 0))) {
const unsigned char *cdata = (const unsigned char *)ncbmb_head(ncbuf);
/* Currently wrapping CRYPTO content is not supported and rejected on frame reception. */
- BUG_ON(cdata + data >= (const unsigned char *)ncbmb_wrap(ncbuf));
+ BUG_ON(cdata + data > (const unsigned char *)ncbmb_wrap(ncbuf));
if (!qc_ssl_provide_quic_data(&qel->cstream->rx.ncbuf, qel->level,
ctx, cdata, data))