Initial commit

This commit is contained in:
2026-03-21 12:43:00 -05:00
commit 83bf16823c
438 changed files with 33617 additions and 0 deletions
@@ -0,0 +1,62 @@
diff --git a/icu/source/test/intltest/ssearch.cpp b/icu/source/test/intltest/ssearch.cpp
index a13df7f..615ea53 100644
--- a/icu/source/test/intltest/ssearch.cpp
+++ b/icu/source/test/intltest/ssearch.cpp
@@ -531,12 +531,26 @@ static char *printOffsets(char *buffer, size_t n, OrderList &list)
for(int32_t i = 0; i < size; i += 1) {
const Order *order = list.get(i);
+ size_t remaining = n - static_cast<size_t>(s - buffer);
+
+ if (remaining == 0) {
+ break;
+ }
if (i != 0) {
- s += snprintf(s, n, ", ");
+ int32_t written = snprintf(s, remaining, ", ");
+ if (written < 0 || static_cast<size_t>(written) >= remaining) {
+ break;
+ }
+ s += written;
+ remaining -= written;
}
- s += snprintf(s, n, "(%d, %d)", order->lowOffset, order->highOffset);
+ int32_t written = snprintf(s, remaining, "(%d, %d)", order->lowOffset, order->highOffset);
+ if (written < 0 || static_cast<size_t>(written) >= remaining) {
+ break;
+ }
+ s += written;
}
return buffer;
@@ -549,12 +563,26 @@ static char *printOrders(char *buffer, size_t n, OrderList &list)
for(int32_t i = 0; i < size; i += 1) {
const Order *order = list.get(i);
+ size_t remaining = n - static_cast<size_t>(s - buffer);
+
+ if (remaining == 0) {
+ break;
+ }
if (i != 0) {
- s += snprintf(s, n, ", ");
+ int32_t written = snprintf(s, remaining, ", ");
+ if (written < 0 || static_cast<size_t>(written) >= remaining) {
+ break;
+ }
+ s += written;
+ remaining -= written;
}
- s += snprintf(s, n, "%8.8X", order->order);
+ int32_t written = snprintf(s, remaining, "%8.8X", order->order);
+ if (written < 0 || static_cast<size_t>(written) >= remaining) {
+ break;
+ }
+ s += written;
}
return buffer;
+43
View File
@@ -0,0 +1,43 @@
[build]
type = "autotools"
[build.flags]
source_subdir = "icu/source"
build_32 = true
host_build = true
configure_lib32 = [ "--with-cross-build=$DEPOT_BUILD_HOST_DIR" ]
[dependencies]
build = ["python"]
runtime = [
"glibc",
"sh",
"libunwind",
"libcxx"
]
[dependencies.lib32]
build = ["python"]
runtime = [
"lib32-glibc",
"lib32-libunwind",
"lib32-libcxx"
]
[package]
description = "International Components for Unicode, version 78"
homepage = "https://icu.unicode.org/"
license = "Unicode-3.0"
name = "icu78"
version = "78.2"
revision = 2
[[source]]
extract_dir = "$name-$version"
sha256 = "3e99687b5c435d4b209630e2d2ebb79906c984685e78635078b672e03c89df35"
url = "https://github.com/unicode-org/icu/releases/download/release-$version/icu4c-$version-sources.tgz"
patches = [ "icu-78.2-fix-ssearch-fortify-overflow.patch" ]
[[manual_sources]]
file = "icu-78.2-fix-ssearch-fortify-overflow.patch"
sha256 = "b2:7de580c89edfdef1d191d9ffd796f5182ecd7b495a192f0280b0fddedb53fec7a9c7df28c4dbc86d1492db3fa6ff1fcd39c8363d7737710693e61bba2661d410"