diff --git a/lib/includes/ngtcp2/ngtcp2.h b/lib/includes/ngtcp2/ngtcp2.h index 5e5c27038ec8dfa2e07d761c1199395101f6febc..fa077b4b2a504133a72b0033012168a69cbc50ec 100644 --- a/lib/includes/ngtcp2/ngtcp2.h +++ b/lib/includes/ngtcp2/ngtcp2.h @@ -731,7 +731,7 @@ typedef struct ngtcp2_addr { /* addrlen is the length of addr. */ size_t addrlen; /* addr points to the buffer which contains endpoint address. It is - opaque to the ngtcp2 library. */ + opaque to the ngtcp2 library. It must not be NULL. */ uint8_t *addr; /* user_data is an arbitrary data and opaque to the library. */ void *user_data; diff --git a/tests/ngtcp2_conn_test.c b/tests/ngtcp2_conn_test.c index 33d59012b2eaf6d45d06da2463c4b24fc746ec43..4f0d854760b9e6a95e162228eeb3f1a2a6e58701 100644 --- a/tests/ngtcp2_conn_test.c +++ b/tests/ngtcp2_conn_test.c @@ -117,7 +117,8 @@ static uint8_t null_key[16]; static uint8_t null_iv[16]; static uint8_t null_hp_key[16]; static uint8_t null_data[4096]; -static ngtcp2_path null_path = {}; +static ngtcp2_path null_path = {{1, (uint8_t *)"0", NULL}, + {1, (uint8_t *)"0", NULL}}; static ngtcp2_path new_path = {{1, (uint8_t *)"1", NULL}, {1, (uint8_t *)"2", NULL}}; @@ -4361,8 +4362,10 @@ void test_ngtcp2_conn_server_path_validation(void) { const uint8_t raw_cid[] = {0x0f, 0x00, 0x00, 0x00}; ngtcp2_cid cid, *new_cid; const uint8_t token[NGTCP2_STATELESS_RESET_TOKENLEN] = {0xff}; - ngtcp2_path new_path1 = {{}, {1, (uint8_t *)"2", NULL}}; - ngtcp2_path new_path2 = {{}, {1, (uint8_t *)"3", NULL}}; + ngtcp2_path new_path1 = {{1, (uint8_t *)"0", NULL}, + {1, (uint8_t *)"2", NULL}}; + ngtcp2_path new_path2 = {{1, (uint8_t *)"0", NULL}, + {1, (uint8_t *)"3", NULL}}; ngtcp2_ksl_it it; ngtcp2_cid_init(&cid, raw_cid, sizeof(raw_cid));