]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
correctly check for message upper limit.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 15 Apr 2014 09:56:06 +0000 (11:56 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 15 Apr 2014 09:56:06 +0000 (11:56 +0200)
lib/gnutls_buffers.c

index 0d81a4ec554cc1c7336ba72d2c14ae9e770e9df5..f318b59a77883875ba4637f3ac20668277137082 100644 (file)
@@ -924,7 +924,7 @@ static int merge_handshake_packet(gnutls_session_t session,
        if (exists == 0)
                pos = session->internals.handshake_recv_buffer_size;
 
-       if (pos > MAX_HANDSHAKE_MSGS)
+       if (pos >= MAX_HANDSHAKE_MSGS)
                return
                    gnutls_assert_val(GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS);