Skip to content

Commit

Permalink
ssl: don't say we consumed bytes if we didn't consume them
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Apr 27, 2020
1 parent 38fe42e commit 2dd0614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app-layer-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ static inline int TlsDecodeHSCertificateAddCertToChain(SSLState *ssl_state,
return 0;
}

/** \retval consumed bytes consumed or -1 on error */
static int TlsDecodeHSCertificate(SSLState *ssl_state,
const uint8_t * const initial_input,
const uint32_t input_len)
Expand All @@ -514,7 +515,7 @@ static int TlsDecodeHSCertificate(SSLState *ssl_state,
Asn1Generic *cert = NULL;

if (!(HAS_SPACE(3)))
return 1;
return 0;

uint32_t cert_chain_len = *input << 16 | *(input + 1) << 8 | *(input + 2);
input += 3;
Expand Down

0 comments on commit 2dd0614

Please sign in to comment.