Skip to content

Commit

Permalink
is_post_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Nov 6, 2024
1 parent 76452d9 commit 4428704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl/ssl_transfer_asn1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,11 @@ static int SSL3_STATE_from_bytes(SSL *ssl, CBS *cbs, const SSL_CTX *ctx) {
return 0;
}

bool is_v2 = (serde_version >= SSL3_STATE_SERDE_VERSION_TWO);
bool is_post_v2 = (serde_version >= SSL3_STATE_SERDE_VERSION_TWO);

// We should have no more data at this point if we are deserializing v1
// encoding.
if (!is_v2 && CBS_len(&s3) > 0) {
if (!is_post_v2 && CBS_len(&s3) > 0) {
OPENSSL_PUT_ERROR(SSL, SSL_R_SERIALIZATION_INVALID_SSL3_STATE);
return 0;
}
Expand Down

0 comments on commit 4428704

Please sign in to comment.