diff options
Diffstat (limited to 'decoders/dtls/test')
| -rw-r--r-- | decoders/dtls/test/dtls_test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/decoders/dtls/test/dtls_test.cpp b/decoders/dtls/test/dtls_test.cpp index 33490df..438dd34 100644 --- a/decoders/dtls/test/dtls_test.cpp +++ b/decoders/dtls/test/dtls_test.cpp @@ -110,12 +110,13 @@ TEST(dtls_decoder, dtls_try_assemble_fragments) dtls_parser_hello(NULL, &handshake_hs, &dtls_msg, NULL); EXPECT_EQ(dtls_msg.msg_type , DTLS_MSG_TYPE_CLIENT_HELLO); ASSERT_TRUE(dtls_msg.msg_content!=NULL); - struct dtls_handshake *hello_info=(struct dtls_handshake *)dtls_msg.msg_content; + struct dtls_handshake *dtls_hs=(struct dtls_handshake *)dtls_msg.msg_content; char sni_str[512]={0}; - memcpy(sni_str, hello_info->sni, hello_info->sni_sz); - sni_str[hello_info->sni_sz]='\0'; + memcpy(sni_str, dtls_hs->sni, dtls_hs->sni_sz); + sni_str[dtls_hs->sni_sz]='\0'; EXPECT_STREQ(sni_str, "localhost"); + if(dtls_hs->extensions!=NULL) utarray_free(dtls_hs->extensions); free(dtls_msg.msg_content); free(parse_ctx->fragments_head->fragment_content); free(parse_ctx->fragments_head); |
