mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-01 15:28:00 +00:00
BUILD: quic: Add a DISGUISE() to please some compiler to qc_prep_hpkts() 1st parameter
Some compiler could complain with such a warning: src/quic_conn.c:3700:44: warning: potential null pointer dereference [-Wnull-dereference] 3700 | frms = &qel->pktns->tx.frms; It could not figure out that <qel> could not be NULL at this location. This is fixed calling qc_prep_hpkts() with a disguise 1st parameter.
This commit is contained in:
parent
7f3c1bef37
commit
36e6c8aa4b
@ -3696,6 +3696,9 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
|
|||||||
next_tel = QUIC_TLS_ENC_LEVEL_APP;
|
next_tel = QUIC_TLS_ENC_LEVEL_APP;
|
||||||
tel = next_tel;
|
tel = next_tel;
|
||||||
qel = qc_quic_enc_level(qc, tel);
|
qel = qc_quic_enc_level(qc, tel);
|
||||||
|
/* Note that we cannot NULL as value for <qel> when for the Application
|
||||||
|
* data encryption level. Furthermore this encryption is never released.
|
||||||
|
*/
|
||||||
if (tel == QUIC_TLS_ENC_LEVEL_APP)
|
if (tel == QUIC_TLS_ENC_LEVEL_APP)
|
||||||
frms = &qel->pktns->tx.frms;
|
frms = &qel->pktns->tx.frms;
|
||||||
else
|
else
|
||||||
@ -5164,7 +5167,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
|
|||||||
b_reset(buf);
|
b_reset(buf);
|
||||||
|
|
||||||
ret = qc_prep_hpkts(qc, buf,
|
ret = qc_prep_hpkts(qc, buf,
|
||||||
qc_quic_enc_level(qc, tel),
|
DISGUISE(qc_quic_enc_level(qc, tel)),
|
||||||
qc_quic_enc_level(qc, next_tel));
|
qc_quic_enc_level(qc, next_tel));
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
qc_txb_release(qc);
|
qc_txb_release(qc);
|
||||||
|
Loading…
Reference in New Issue
Block a user