From e89b2bcdb711b30017bf47944ebfff2c8f6e3d3f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 11 Jan 2025 13:17:54 -0800 Subject: [PATCH 1/2] quic: fixup errant LocalVector usage --- src/quic/session.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quic/session.cc b/src/quic/session.cc index d939edee18e01a..236908063f5249 100644 --- a/src/quic/session.cc +++ b/src/quic/session.cc @@ -2728,7 +2728,7 @@ void Session::EmitVersionNegotiation(const ngtcp2_pkt_hd& hd, LocalVector versions(env()->isolate(), nsv); for (size_t n = 0; n < nsv; n++) { - versions.push_back(Integer::NewFromUnsigned(env()->isolate(), sv[n])); + versions[0] = Integer::NewFromUnsigned(env()->isolate(), sv[n]); } // supported are the versions we acutually support expressed as a range. From f1b3f7595a101a232684bbb13aaa0d19f503d9e6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 12 Jan 2025 06:56:26 -0800 Subject: [PATCH 2/2] Update src/quic/session.cc Co-authored-by: Yagiz Nizipli --- src/quic/session.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quic/session.cc b/src/quic/session.cc index 236908063f5249..608899a59f3cb7 100644 --- a/src/quic/session.cc +++ b/src/quic/session.cc @@ -2728,7 +2728,7 @@ void Session::EmitVersionNegotiation(const ngtcp2_pkt_hd& hd, LocalVector versions(env()->isolate(), nsv); for (size_t n = 0; n < nsv; n++) { - versions[0] = Integer::NewFromUnsigned(env()->isolate(), sv[n]); + versions[n] = Integer::NewFromUnsigned(env()->isolate(), sv[n]); } // supported are the versions we acutually support expressed as a range.