diff options
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/packet_locl.h | 3 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 2 | ||||
-rw-r--r-- | ssl/t1_lib.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ssl/packet_locl.h b/ssl/packet_locl.h index 80d0b93fd9..a5e4d00911 100644 --- a/ssl/packet_locl.h +++ b/ssl/packet_locl.h @@ -80,8 +80,7 @@ typedef struct { } PACKET; /* - * Returns 1 if there are exactly |len| bytes left to be read from |pkt| - * and 0 otherwise + * Returns the number of bytes remaining to be read in the PACKET */ __owur static inline size_t PACKET_remaining(PACKET *pkt) { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index c723ea0f2d..a015a495c7 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1059,7 +1059,7 @@ int ssl3_get_client_hello(SSL *s) memset(s->s3->client_random, 0, SSL3_RANDOM_SIZE); if (!PACKET_peek_copy_bytes(&pkt, s->s3->client_random, i) || !PACKET_forward(&pkt, cl) - || !PACKET_remaining(&pkt) == 0) { + || PACKET_remaining(&pkt) != 0) { SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_RECORD_LENGTH_MISMATCH); al = SSL_AD_DECODE_ERROR; goto f_err; diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index ece2b72ac6..e37411ccbf 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2036,7 +2036,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al) } } /* We shouldn't have any bytes left */ - if (PACKET_remaining(&ssubpkt)) + if (PACKET_remaining(&ssubpkt) != 0) goto err; } @@ -2140,7 +2140,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al) || (dsize & 1) != 0 || (dsize == 0) || !PACKET_get_bytes(&subpkt, &data, dsize) - || PACKET_remaining(&subpkt) + || PACKET_remaining(&subpkt) != 0 || !tls1_save_sigalgs(s, data, dsize)) { goto err; } |