]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
qlog_event_helpers.c: Fix inverted condition
authorTomas Mraz <tomas@openssl.org>
Mon, 24 Mar 2025 09:53:02 +0000 (10:53 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 24 Mar 2025 14:22:56 +0000 (15:22 +0100)
We want to skip up to PACKET_remaining() and not "at least"
PACKET_remaining() bytes.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27138)

ssl/quic/qlog_event_helpers.c

index 55cc28d9f9b707739c9d7e3f9c0cdce4905fa8df..190b6968fc001fa269730dfa378dc3ac62c871eb 100644 (file)
@@ -542,7 +542,7 @@ static int log_frames(QLOG *qlog_instance,
             if (need_skip > 0) {
                 size_t adv = need_skip;
 
-                if (adv < PACKET_remaining(&pkt))
+                if (adv > PACKET_remaining(&pkt))
                     adv = PACKET_remaining(&pkt);
 
                 if (!PACKET_forward(&pkt, adv))