Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a999edd

Browse filesBrowse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.20.0
PR-URL: #61511 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 256fc67 commit a999edd
Copy full SHA for a999edd

28 files changed

+368-438Lines changed: 368 additions & 438 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <openssl/chacha.h>
4040
#include <openssl/rand.h>
4141

42+
#include "ngtcp2_macro.h"
4243
#include "shared.h"
4344

4445
typedef enum ngtcp2_crypto_boringssl_cipher_type {
@@ -419,7 +420,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
419420
#else /* !defined(WORDS_BIGENDIAN) */
420421
memcpy(&counter, sample, sizeof(counter));
421422
#endif /* !defined(WORDS_BIGENDIAN) */
422-
CRYPTO_chacha_20(dest, PLAINTEXT, sizeof(PLAINTEXT) - 1, ctx->key,
423+
CRYPTO_chacha_20(dest, PLAINTEXT, ngtcp2_strlen_lit(PLAINTEXT), ctx->key,
423424
sample + sizeof(counter), counter);
424425
return 0;
425426
default:
Collapse file

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,9 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
845845
(void)hp;
846846

847847
if (!EVP_EncryptInit_ex(actx, NULL, NULL, NULL, sample) ||
848-
!EVP_EncryptUpdate(actx, dest, &len, PLAINTEXT, sizeof(PLAINTEXT) - 1) ||
849-
!EVP_EncryptFinal_ex(actx, dest + sizeof(PLAINTEXT) - 1, &len)) {
848+
!EVP_EncryptUpdate(actx, dest, &len, PLAINTEXT,
849+
ngtcp2_strlen_lit(PLAINTEXT)) ||
850+
!EVP_EncryptFinal_ex(actx, dest + ngtcp2_strlen_lit(PLAINTEXT), &len)) {
850851
return -1;
851852
}
852853

Collapse file

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <picotls.h>
3636
#include <picotls/openssl.h>
3737

38+
#include "ngtcp2_macro.h"
3839
#include "shared.h"
3940

4041
ngtcp2_crypto_aead *ngtcp2_crypto_aead_aes_128_gcm(ngtcp2_crypto_aead *aead) {
@@ -357,7 +358,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
357358
(void)hp;
358359

359360
ptls_cipher_init(actx, sample);
360-
ptls_cipher_encrypt(actx, dest, PLAINTEXT, sizeof(PLAINTEXT) - 1);
361+
ptls_cipher_encrypt(actx, dest, PLAINTEXT, ngtcp2_strlen_lit(PLAINTEXT));
361362

362363
return 0;
363364
}
Collapse file

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
# include <openssl/core_names.h>
4141
#endif /* OPENSSL_VERSION_NUMBER >= 0x30000000L */
4242

43+
#include "ngtcp2_macro.h"
4344
#include "shared.h"
4445

4546
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
@@ -785,8 +786,9 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
785786
(void)hp;
786787

787788
if (!EVP_EncryptInit_ex(actx, NULL, NULL, NULL, sample) ||
788-
!EVP_EncryptUpdate(actx, dest, &len, PLAINTEXT, sizeof(PLAINTEXT) - 1) ||
789-
!EVP_EncryptFinal_ex(actx, dest + sizeof(PLAINTEXT) - 1, &len)) {
789+
!EVP_EncryptUpdate(actx, dest, &len, PLAINTEXT,
790+
ngtcp2_strlen_lit(PLAINTEXT)) ||
791+
!EVP_EncryptFinal_ex(actx, dest + ngtcp2_strlen_lit(PLAINTEXT), &len)) {
790792
return -1;
791793
}
792794

Collapse file

‎deps/ngtcp2/ngtcp2/crypto/shared.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/shared.c
+52-50Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ int ngtcp2_crypto_hkdf_expand_label(uint8_t *dest, size_t destlen,
5353

5454
*p++ = (uint8_t)(destlen / 256);
5555
*p++ = (uint8_t)(destlen % 256);
56-
*p++ = (uint8_t)(sizeof(LABEL) - 1 + labellen);
57-
memcpy(p, LABEL, sizeof(LABEL) - 1);
58-
p += sizeof(LABEL) - 1;
56+
*p++ = (uint8_t)(ngtcp2_strlen_lit(LABEL) + labellen);
57+
memcpy(p, LABEL, ngtcp2_strlen_lit(LABEL));
58+
p += ngtcp2_strlen_lit(LABEL);
5959
memcpy(p, label, labellen);
6060
p += labellen;
6161
*p++ = 0;
@@ -88,11 +88,11 @@ int ngtcp2_crypto_derive_initial_secrets(uint8_t *rx_secret, uint8_t *tx_secret,
8888
case NGTCP2_PROTO_VER_V1:
8989
default:
9090
salt = (const uint8_t *)NGTCP2_INITIAL_SALT_V1;
91-
saltlen = sizeof(NGTCP2_INITIAL_SALT_V1) - 1;
91+
saltlen = ngtcp2_strlen_lit(NGTCP2_INITIAL_SALT_V1);
9292
break;
9393
case NGTCP2_PROTO_VER_V2:
9494
salt = (const uint8_t *)NGTCP2_INITIAL_SALT_V2;
95-
saltlen = sizeof(NGTCP2_INITIAL_SALT_V2) - 1;
95+
saltlen = ngtcp2_strlen_lit(NGTCP2_INITIAL_SALT_V2);
9696
break;
9797
}
9898

@@ -111,10 +111,12 @@ int ngtcp2_crypto_derive_initial_secrets(uint8_t *rx_secret, uint8_t *tx_secret,
111111

112112
if (ngtcp2_crypto_hkdf_expand_label(
113113
client_secret, NGTCP2_CRYPTO_INITIAL_SECRETLEN, &ctx.md, initial_secret,
114-
NGTCP2_CRYPTO_INITIAL_SECRETLEN, CLABEL, sizeof(CLABEL) - 1) != 0 ||
114+
NGTCP2_CRYPTO_INITIAL_SECRETLEN, CLABEL,
115+
ngtcp2_strlen_lit(CLABEL)) != 0 ||
115116
ngtcp2_crypto_hkdf_expand_label(
116117
server_secret, NGTCP2_CRYPTO_INITIAL_SECRETLEN, &ctx.md, initial_secret,
117-
NGTCP2_CRYPTO_INITIAL_SECRETLEN, SLABEL, sizeof(SLABEL) - 1) != 0) {
118+
NGTCP2_CRYPTO_INITIAL_SECRETLEN, SLABEL,
119+
ngtcp2_strlen_lit(SLABEL)) != 0) {
118120
return -1;
119121
}
120122

@@ -148,19 +150,19 @@ int ngtcp2_crypto_derive_packet_protection_key(
148150
switch (version) {
149151
case NGTCP2_PROTO_VER_V2:
150152
key_label = KEY_LABEL_V2;
151-
key_labellen = sizeof(KEY_LABEL_V2) - 1;
153+
key_labellen = ngtcp2_strlen_lit(KEY_LABEL_V2);
152154
iv_label = IV_LABEL_V2;
153-
iv_labellen = sizeof(IV_LABEL_V2) - 1;
155+
iv_labellen = ngtcp2_strlen_lit(IV_LABEL_V2);
154156
hp_key_label = HP_KEY_LABEL_V2;
155-
hp_key_labellen = sizeof(HP_KEY_LABEL_V2) - 1;
157+
hp_key_labellen = ngtcp2_strlen_lit(HP_KEY_LABEL_V2);
156158
break;
157159
default:
158160
key_label = KEY_LABEL_V1;
159-
key_labellen = sizeof(KEY_LABEL_V1) - 1;
161+
key_labellen = ngtcp2_strlen_lit(KEY_LABEL_V1);
160162
iv_label = IV_LABEL_V1;
161-
iv_labellen = sizeof(IV_LABEL_V1) - 1;
163+
iv_labellen = ngtcp2_strlen_lit(IV_LABEL_V1);
162164
hp_key_label = HP_KEY_LABEL_V1;
163-
hp_key_labellen = sizeof(HP_KEY_LABEL_V1) - 1;
165+
hp_key_labellen = ngtcp2_strlen_lit(HP_KEY_LABEL_V1);
164166
}
165167

166168
if (ngtcp2_crypto_hkdf_expand_label(key, keylen, md, secret, secretlen,
@@ -194,11 +196,11 @@ int ngtcp2_crypto_update_traffic_secret(uint8_t *dest, uint32_t version,
194196
switch (version) {
195197
case NGTCP2_PROTO_VER_V2:
196198
label = LABEL_V2;
197-
labellen = sizeof(LABEL_V2) - 1;
199+
labellen = ngtcp2_strlen_lit(LABEL_V2);
198200
break;
199201
default:
200202
label = LABEL;
201-
labellen = sizeof(LABEL) - 1;
203+
labellen = ngtcp2_strlen_lit(LABEL);
202204
}
203205

204206
if (ngtcp2_crypto_hkdf_expand_label(dest, secretlen, md, secret, secretlen,
@@ -592,11 +594,11 @@ int ngtcp2_crypto_derive_and_install_initial_key(
592594
case NGTCP2_PROTO_VER_V1:
593595
default:
594596
retry_key = (const uint8_t *)NGTCP2_RETRY_KEY_V1;
595-
retry_noncelen = sizeof(NGTCP2_RETRY_NONCE_V1) - 1;
597+
retry_noncelen = ngtcp2_strlen_lit(NGTCP2_RETRY_NONCE_V1);
596598
break;
597599
case NGTCP2_PROTO_VER_V2:
598600
retry_key = (const uint8_t *)NGTCP2_RETRY_KEY_V2;
599-
retry_noncelen = sizeof(NGTCP2_RETRY_NONCE_V2) - 1;
601+
retry_noncelen = ngtcp2_strlen_lit(NGTCP2_RETRY_NONCE_V2);
600602
break;
601603
}
602604

@@ -845,7 +847,7 @@ int ngtcp2_crypto_generate_stateless_reset_token(uint8_t *token,
845847
if (ngtcp2_crypto_hkdf(token, NGTCP2_STATELESS_RESET_TOKENLEN,
846848
ngtcp2_crypto_md_sha256(&md), secret, secretlen,
847849
cid->data, cid->datalen, info,
848-
sizeof(info) - 1) != 0) {
850+
ngtcp2_strlen_lit(info)) != 0) {
849851
return -1;
850852
}
851853

@@ -865,8 +867,8 @@ static int crypto_derive_token_key(uint8_t *key, size_t keylen, uint8_t *iv,
865867
uint8_t *p;
866868

867869
assert(ngtcp2_crypto_md_hashlen(md) == sizeof(intsecret));
868-
assert(info_prefixlen + sizeof(key_info_suffix) - 1 <= sizeof(info));
869-
assert(info_prefixlen + sizeof(iv_info_suffix) - 1 <= sizeof(info));
870+
assert(info_prefixlen + ngtcp2_strlen_lit(key_info_suffix) <= sizeof(info));
871+
assert(info_prefixlen + ngtcp2_strlen_lit(iv_info_suffix) <= sizeof(info));
870872

871873
if (ngtcp2_crypto_hkdf_extract(intsecret, md, secret, secretlen, salt,
872874
saltlen) != 0) {
@@ -876,8 +878,8 @@ static int crypto_derive_token_key(uint8_t *key, size_t keylen, uint8_t *iv,
876878
memcpy(info, info_prefix, info_prefixlen);
877879
p = info + info_prefixlen;
878880

879-
memcpy(p, key_info_suffix, sizeof(key_info_suffix) - 1);
880-
p += sizeof(key_info_suffix) - 1;
881+
memcpy(p, key_info_suffix, ngtcp2_strlen_lit(key_info_suffix));
882+
p += ngtcp2_strlen_lit(key_info_suffix);
881883

882884
if (ngtcp2_crypto_hkdf_expand(key, keylen, md, intsecret, sizeof(intsecret),
883885
info, (size_t)(p - info)) != 0) {
@@ -886,8 +888,8 @@ static int crypto_derive_token_key(uint8_t *key, size_t keylen, uint8_t *iv,
886888

887889
p = info + info_prefixlen;
888890

889-
memcpy(p, iv_info_suffix, sizeof(iv_info_suffix) - 1);
890-
p += sizeof(iv_info_suffix) - 1;
891+
memcpy(p, iv_info_suffix, ngtcp2_strlen_lit(iv_info_suffix));
892+
p += ngtcp2_strlen_lit(iv_info_suffix);
891893

892894
if (ngtcp2_crypto_hkdf_expand(iv, ivlen, md, intsecret, sizeof(intsecret),
893895
info, (size_t)(p - info)) != 0) {
@@ -963,10 +965,10 @@ ngtcp2_ssize ngtcp2_crypto_generate_retry_token(
963965
assert(sizeof(key) == keylen);
964966
assert(sizeof(iv) == ivlen);
965967

966-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
967-
rand_data, sizeof(rand_data),
968-
retry_token_info_prefix,
969-
sizeof(retry_token_info_prefix) - 1) != 0) {
968+
if (crypto_derive_token_key(
969+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
970+
sizeof(rand_data), retry_token_info_prefix,
971+
ngtcp2_strlen_lit(retry_token_info_prefix)) != 0) {
970972
return -1;
971973
}
972974

@@ -1040,10 +1042,10 @@ int ngtcp2_crypto_verify_retry_token(
10401042
assert(sizeof(key) == keylen);
10411043
assert(sizeof(iv) == ivlen);
10421044

1043-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
1044-
rand_data, NGTCP2_CRYPTO_TOKEN_RAND_DATALEN,
1045-
retry_token_info_prefix,
1046-
sizeof(retry_token_info_prefix) - 1) != 0) {
1045+
if (crypto_derive_token_key(
1046+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
1047+
NGTCP2_CRYPTO_TOKEN_RAND_DATALEN, retry_token_info_prefix,
1048+
ngtcp2_strlen_lit(retry_token_info_prefix)) != 0) {
10471049
return -1;
10481050
}
10491051

@@ -1143,10 +1145,10 @@ ngtcp2_ssize ngtcp2_crypto_generate_retry_token2(
11431145
assert(sizeof(key) == keylen);
11441146
assert(sizeof(iv) == ivlen);
11451147

1146-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
1147-
rand_data, sizeof(rand_data),
1148-
retry_token_info_prefix2,
1149-
sizeof(retry_token_info_prefix2) - 1) != 0) {
1148+
if (crypto_derive_token_key(
1149+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
1150+
sizeof(rand_data), retry_token_info_prefix2,
1151+
ngtcp2_strlen_lit(retry_token_info_prefix2)) != 0) {
11501152
return -1;
11511153
}
11521154

@@ -1221,10 +1223,10 @@ int ngtcp2_crypto_verify_retry_token2(
12211223
assert(sizeof(key) == keylen);
12221224
assert(sizeof(iv) == ivlen);
12231225

1224-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
1225-
rand_data, NGTCP2_CRYPTO_TOKEN_RAND_DATALEN,
1226-
retry_token_info_prefix2,
1227-
sizeof(retry_token_info_prefix2) - 1) != 0) {
1226+
if (crypto_derive_token_key(
1227+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
1228+
NGTCP2_CRYPTO_TOKEN_RAND_DATALEN, retry_token_info_prefix2,
1229+
ngtcp2_strlen_lit(retry_token_info_prefix2)) != 0) {
12281230
return NGTCP2_CRYPTO_ERR_INTERNAL;
12291231
}
12301232

@@ -1366,10 +1368,10 @@ static ngtcp2_ssize crypto_generate_regular_token(
13661368
assert(sizeof(key) == keylen);
13671369
assert(sizeof(iv) == ivlen);
13681370

1369-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
1370-
rand_data, sizeof(rand_data),
1371-
regular_token_info_prefix,
1372-
sizeof(regular_token_info_prefix) - 1) != 0) {
1371+
if (crypto_derive_token_key(
1372+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
1373+
sizeof(rand_data), regular_token_info_prefix,
1374+
ngtcp2_strlen_lit(regular_token_info_prefix)) != 0) {
13731375
return -1;
13741376
}
13751377

@@ -1442,10 +1444,10 @@ static ngtcp2_ssize crypto_verify_regular_token(
14421444
assert(sizeof(key) == keylen);
14431445
assert(sizeof(iv) == ivlen);
14441446

1445-
if (crypto_derive_token_key(key, keylen, iv, ivlen, &md, secret, secretlen,
1446-
rand_data, NGTCP2_CRYPTO_TOKEN_RAND_DATALEN,
1447-
regular_token_info_prefix,
1448-
sizeof(regular_token_info_prefix) - 1) != 0) {
1447+
if (crypto_derive_token_key(
1448+
key, keylen, iv, ivlen, &md, secret, secretlen, rand_data,
1449+
NGTCP2_CRYPTO_TOKEN_RAND_DATALEN, regular_token_info_prefix,
1450+
ngtcp2_strlen_lit(regular_token_info_prefix)) != 0) {
14491451
return NGTCP2_CRYPTO_ERR_INTERNAL;
14501452
}
14511453

@@ -1601,11 +1603,11 @@ ngtcp2_ssize ngtcp2_crypto_write_retry(uint8_t *dest, size_t destlen,
16011603
case NGTCP2_PROTO_VER_V1:
16021604
default:
16031605
key = (const uint8_t *)NGTCP2_RETRY_KEY_V1;
1604-
noncelen = sizeof(NGTCP2_RETRY_NONCE_V1) - 1;
1606+
noncelen = ngtcp2_strlen_lit(NGTCP2_RETRY_NONCE_V1);
16051607
break;
16061608
case NGTCP2_PROTO_VER_V2:
16071609
key = (const uint8_t *)NGTCP2_RETRY_KEY_V2;
1608-
noncelen = sizeof(NGTCP2_RETRY_NONCE_V2) - 1;
1610+
noncelen = ngtcp2_strlen_lit(NGTCP2_RETRY_NONCE_V2);
16091611
break;
16101612
}
16111613

Collapse file

‎deps/ngtcp2/ngtcp2/crypto/wolfssl/wolfssl.c‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/wolfssl/wolfssl.c
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <wolfssl/ssl.h>
3535
#include <wolfssl/quic.h>
3636

37+
#include "ngtcp2_macro.h"
3738
#include "shared.h"
3839

3940
#define PRINTF_DEBUG 0
@@ -297,9 +298,10 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
297298
if (wolfSSL_EVP_EncryptInit_ex(actx, NULL, NULL, NULL, sample) !=
298299
WOLFSSL_SUCCESS ||
299300
wolfSSL_EVP_CipherUpdate(actx, dest, &len, PLAINTEXT,
300-
sizeof(PLAINTEXT) - 1) != WOLFSSL_SUCCESS ||
301-
wolfSSL_EVP_EncryptFinal_ex(actx, dest + sizeof(PLAINTEXT) - 1, &len) !=
302-
WOLFSSL_SUCCESS) {
301+
ngtcp2_strlen_lit(PLAINTEXT)) !=
302+
WOLFSSL_SUCCESS ||
303+
wolfSSL_EVP_EncryptFinal_ex(actx, dest + ngtcp2_strlen_lit(PLAINTEXT),
304+
&len) != WOLFSSL_SUCCESS) {
303305
DEBUG_MSG("WOLFSSL: hp_mask FAILED\n");
304306
return -1;
305307
}
Collapse file

‎deps/ngtcp2/ngtcp2/examples/client.cc‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/examples/client.cc
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,16 +1049,17 @@ ngtcp2_ssize write_pkt(ngtcp2_conn *conn, ngtcp2_path *path,
10491049
ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi,
10501050
uint8_t *dest, size_t destlen,
10511051
ngtcp2_tstamp ts) {
1052-
std::array<nghttp3_vec, 16> vec;
1052+
std::array<SharedVec, 16> vec;
10531053

10541054
for (;;) {
10551055
int64_t stream_id = -1;
10561056
int fin = 0;
10571057
nghttp3_ssize sveccnt = 0;
10581058

10591059
if (httpconn_ && ngtcp2_conn_get_max_data_left(conn_)) {
1060-
sveccnt = nghttp3_conn_writev_stream(httpconn_, &stream_id, &fin,
1061-
vec.data(), vec.size());
1060+
sveccnt = nghttp3_conn_writev_stream(
1061+
httpconn_, &stream_id, &fin,
1062+
reinterpret_cast<nghttp3_vec *>(vec.data()), vec.size());
10621063
if (sveccnt < 0) {
10631064
std::cerr << "nghttp3_conn_writev_stream: "
10641065
<< nghttp3_strerror(static_cast<int>(sveccnt)) << std::endl;
@@ -1071,7 +1072,6 @@ ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi,
10711072
}
10721073

10731074
ngtcp2_ssize ndatalen;
1074-
auto v = vec.data();
10751075
auto vcnt = static_cast<size_t>(sveccnt);
10761076

10771077
uint32_t flags = NGTCP2_WRITE_STREAM_FLAG_MORE;
@@ -1081,7 +1081,7 @@ ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi,
10811081

10821082
auto nwrite = ngtcp2_conn_writev_stream(
10831083
conn_, path, pi, dest, destlen, &ndatalen, flags, stream_id,
1084-
reinterpret_cast<const ngtcp2_vec *>(v), vcnt, ts);
1084+
reinterpret_cast<const ngtcp2_vec *>(vec.data()), vcnt, ts);
10851085
if (nwrite < 0) {
10861086
switch (nwrite) {
10871087
case NGTCP2_ERR_STREAM_DATA_BLOCKED:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.