diff --git a/meta-networking/recipes-protocols/ngtcp2/ngtcp2/0001-examples-server-Do-not-truncate-file-sizes-on-32-bit.patch b/meta-networking/recipes-protocols/ngtcp2/ngtcp2/0001-examples-server-Do-not-truncate-file-sizes-on-32-bit.patch deleted file mode 100644 index 746663dc20..0000000000 --- a/meta-networking/recipes-protocols/ngtcp2/ngtcp2/0001-examples-server-Do-not-truncate-file-sizes-on-32-bit.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Khem Raj -Date: Wed, 21 Oct 2026 09:00:00 -0700 -Subject: [PATCH] examples/server: Do not truncate file sizes on 32-bit - targets - -FileEntry::len is a uint64_t, but it is used for mmap() and as the size -of the resp_data std::span, both of which take a size_t. On targets -where size_t is 32 bits, such as riscv32, clang rejects the narrowing in -the span initializer: - - examples/server.cc:236:54: error: non-constant-expression cannot be - narrowed from type 'uint64_t' (aka 'unsigned long long') to - 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] - -The value is already truncated earlier, where st_size is cast to size_t -before mmap(), so a file larger than the address space would be served -with the wrong length. - -Store the length as a size_t, and fail open_file() with -Error::INTEGER_OVERFLOW when the file is too large to map, instead of -truncating its size. - -Upstream-Status: Submitted [https://github.com/ngtcp2/ngtcp2/pull/2330] -Signed-off-by: Khem Raj ---- - examples/server.cc | 7 +++++++ - examples/server.h | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - ---- a/examples/server.cc -+++ b/examples/server.cc -@@ -31,6 +31,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -216,6 +218,11 @@ - close(fd); - } else { - fe.fd = fd; -+ // A file larger than the address space cannot be mapped. -+ if (std::cmp_greater(st.st_size, std::numeric_limits::max())) { -+ close(fd); -+ return std::unexpected{Error::INTEGER_OVERFLOW}; -+ } - fe.len = static_cast(st.st_size); - if (fe.len) { - fe.map = mmap(nullptr, fe.len, PROT_READ, MAP_SHARED, fd, 0); ---- a/examples/server.h -+++ b/examples/server.h -@@ -68,7 +68,7 @@ - }; - - struct FileEntry { -- uint64_t len{}; -+ size_t len{}; - void *map{}; - int fd{}; - uint8_t flags{}; diff --git a/meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.25.0.bb b/meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.26.0.bb similarity index 86% rename from meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.25.0.bb rename to meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.26.0.bb index a9d834a1b2..a11b510d10 100644 --- a/meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.25.0.bb +++ b/meta-networking/recipes-protocols/ngtcp2/ngtcp2_1.26.0.bb @@ -5,9 +5,8 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=de0966c8ff4f62661a3da92967a75434" SRC_URI = "gitsm://github.com/ngtcp2/ngtcp2;protocol=https;branch=main;tag=v${PV} \ - file://0001-examples-server-Do-not-truncate-file-sizes-on-32-bit.patch \ " -SRCREV = "f9e9ff01ad2c8116bc09de4f644b0028a61486a6" +SRCREV = "6a22a4d7a111f6b52391910e40ad3681a09cfb9c" DEPENDS = "brotli libev nghttp3"