mirror of
https://github.com/openssl/openssl.git
synced 2024-12-04 15:34:41 +08:00
QUIC QLOG: Fix use of size_t and uint64_t
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23517)
This commit is contained in:
parent
1548e3cdaa
commit
2c63ec6fd3
@ -204,7 +204,7 @@ static void ignore_res(int x) {}
|
||||
* data on what frames it contained.
|
||||
*/
|
||||
static int log_frame_actual(QLOG *qlog_instance, PACKET *pkt,
|
||||
uint64_t *need_skip)
|
||||
size_t *need_skip)
|
||||
{
|
||||
uint64_t frame_type;
|
||||
OSSL_QUIC_FRAME_ACK ack;
|
||||
@ -295,7 +295,7 @@ static int log_frame_actual(QLOG *qlog_instance, PACKET *pkt,
|
||||
QLOG_STR("frame_type", "crypto");
|
||||
QLOG_U64("offset", f.offset);
|
||||
QLOG_U64("payload_length", f.len);
|
||||
*need_skip += f.len;
|
||||
*need_skip += (size_t)f.len;
|
||||
}
|
||||
break;
|
||||
case OSSL_QUIC_FRAME_TYPE_STREAM:
|
||||
@ -319,7 +319,8 @@ static int log_frame_actual(QLOG *qlog_instance, PACKET *pkt,
|
||||
QLOG_BOOL("explicit_length", f.has_explicit_len);
|
||||
if (f.is_fin)
|
||||
QLOG_BOOL("fin", 1);
|
||||
*need_skip = f.has_explicit_len ? *need_skip + f.len : UINT64_MAX;
|
||||
*need_skip = f.has_explicit_len
|
||||
? *need_skip + (size_t)f.len : SIZE_MAX;
|
||||
}
|
||||
break;
|
||||
case OSSL_QUIC_FRAME_TYPE_MAX_DATA:
|
||||
@ -512,7 +513,7 @@ unknown:
|
||||
}
|
||||
|
||||
static void log_frame(QLOG *qlog_instance, PACKET *pkt,
|
||||
uint64_t *need_skip)
|
||||
size_t *need_skip)
|
||||
{
|
||||
size_t rem_before, rem_after;
|
||||
|
||||
@ -531,7 +532,7 @@ static int log_frames(QLOG *qlog_instance,
|
||||
{
|
||||
size_t i;
|
||||
PACKET pkt;
|
||||
uint64_t need_skip = 0;
|
||||
size_t need_skip = 0;
|
||||
|
||||
for (i = 0; i < num_iovec; ++i) {
|
||||
if (!PACKET_buf_init(&pkt, iovec[i].buf, iovec[i].buf_len))
|
||||
|
Loading…
Reference in New Issue
Block a user