Message ID | 20250507142110.3452012-10-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4683:0:b0:38f:210b:807b with SMTP id u3csp411780wrq; Wed, 7 May 2025 07:33:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXnKZTtp/7pbitRXGxN+U+9oK4XzmTyyNjbiiWl91PNlzoHRQUrHBh87B0wppB7ilM8wvfW6A==@linaro.org X-Google-Smtp-Source: AGHT+IEk7ahGAHA9AM7KKdSkd22ZnzLw6crMaakOwoURfyGEJ1m2U6shNXLXZthWjbv3i2SMJV+r X-Received: by 2002:a05:6214:c46:b0:6f5:1034:7be7 with SMTP id 6a1803df08f44-6f542ae09e2mr61044736d6.37.1746628389897; Wed, 07 May 2025 07:33:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1746628389; cv=pass; d=google.com; s=arc-20240605; b=BQDtPc/oGwewsvUio5Q/B+e2mOannjy1iwJfUVo7QQedvUZf5WFIir1MxiR7n3hmgl bFIPd5CRggCjW2RGDLyoivP0I6N+XsHrNJRjyC3a1Ikr6OWzdyR682XiBB4URrqF5x0V blmcwUyHBsI3eP/xFUzdudrgCCxyEOjC7Th/kf7Ejc1nVmzFWS8MY1TvlaOsguQGUUFM HjCQ5wJQPFfaLRV+z1oXYfgwuXEYytsPmJi0mb/8lUsa8wqj2K1ooelXGDCHxQ8pAag2 skGFyeli02syDIPFQDS9LhqYQ/M5Ldx2fKYHKgVwEi5ykdO7CNdpuzqv/mjLlPEOPR2Z in1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=6Uhbj8BOnt4Q1DD/tpRisEis/EOhqhxNkifexbpBBJI=; fh=v2Nv3k9i7Amxu65q1mEuFELTOLzYYycJBMRhbhFxZhE=; b=d5yCbYM4DP3DbSjR5jmKdCyF+xTxQBXeunwWOqw9EcbFI4KN2Y+UIu9qWrOXYoy3nm qyNtewT7gNFysHVwtKtL9WdMwDIsi14iPWkN0Z5A/jT0YNfGu0akSjZDwCWd6CehYeB0 o6WaCptLAXyw8qzDwVI+7ofcz74bMCOF5Gfk9ZdeW9SjsWApCtLN96ofXYXrG03M0n/Z knKKDV0VeFLeaHm/9ywhS9MFdb2lfUlYZs2swQn+Yd0pHu6W9jmJ/ssHGutltraUThbZ AzHnzSU3BrK+GNsxhZWH+z/jwpP1Tx41h9fYT57wzPO/pFgnUxEp1UFdCmJNq6H7Ezk8 Ew+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="g3/IuLGe"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <libc-alpha-bounces~patch=linaro.org@sourceware.org> Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6f5427e1f0fsi20595156d6.379.2025.05.07.07.33.09 for <patch@linaro.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 07:33:09 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="g3/IuLGe"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65EF73857B96 for <patch@linaro.org>; Wed, 7 May 2025 14:33:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65EF73857B96 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=g3/IuLGe X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 91B243858C62 for <libc-alpha@sourceware.org>; Wed, 7 May 2025 14:22:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 91B243858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 91B243858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1746627737; cv=none; b=rumqgVxQlPbXDM3Y3QO3O1hF3IWnT+z0PS+V8qxEzmyDIyjqSXYctek1yFRYUnKtgkBQef5j74OaFixT0WngKjTkDMh7EW1BuAnjY9p+TRagdqLz04uc2YBbMNdMDsG3KR75EKBFVobu2Z+j34Cz+yVOan8fG1kej+dBFq95oGI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1746627737; c=relaxed/simple; bh=HB0FYJusXnQU81GctvxV5BJVNfO1Mu4mZ+FNMhw8F28=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dFjvOYPdyOuJC4xNNohY8D+1bekKa0HTTh5hEcRE5W0b1q8pEo3w3nfRpfWgb4+K7LxkF+kgJNc5qB9BLMFya7ESKmYfQXeMCtK9jobO9+wSsoVwEzFYkszFkeM/GDiJ9OHUkeJwPUIif6ywNvPfEunZJ7lcyUS7Av/pqgWOH2Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-225477548e1so73679365ad.0 for <libc-alpha@sourceware.org>; Wed, 07 May 2025 07:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746627736; x=1747232536; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6Uhbj8BOnt4Q1DD/tpRisEis/EOhqhxNkifexbpBBJI=; b=g3/IuLGecEhiAU7yWqifz5GjUZkUgpqhZmYupeC9xdyD0/StwkrGRoI+sL9IuujqYs 1iALq3NnklLF76uYK7ioi4MeqPyG0Fa/rOOUuY5Kln6LaYcpVHkbqEJ7dyCjDN5AvnhU YJqZoTI6JUPEKMiEo7eNwX29plMgzQDUcXPNZEJyCEZw62qK4MoANzKLa4IQ45Mmps2s FbDtz2mrYwOraE9IF8c/ZwT+TZlFgsGcoaVKcZpP8ZjmYz0P7c3JJgWKu+GAknYHYXHJ taIqGhFwtvnMagKXsdSwl3Dvyqo54AZIch1hPgWVgCxf56aLxDLmI/Z+kbHfWz79ZB0W Q7YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746627736; x=1747232536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6Uhbj8BOnt4Q1DD/tpRisEis/EOhqhxNkifexbpBBJI=; b=n8ZaE2a8LZu4WaCwfN6/JNCfPRJ7yCr404KNhQp5DZTjQLs+j9yjm74sZ9CQcJH3hB VBTD8l3AQMAxCzIMsgCIUpYdrJLOcUJi7Be4+FAw+xgtQllFzifmJcT/sXtsGISPfcVx gLWnyrKpvJaGYT2i+WzTSrn/MHEcen8f3Z3H/Jq14yYJaQ1omV4YwymkHamC22wJATkS RyMQr4LVqEt8gs5p9U7DcNLFd4GMr+peZ9xQ6pDuFMCsS4h1qCeqfFUEfZBgxHMwlKQH SsmwOrZuL43RmXOD6su0Z9PUPv9+vAF4oips4U7Iha26WaAO13ZSu3h6LM8ElDEa4E/7 kOdw== X-Gm-Message-State: AOJu0Ywv71RyaVQooZYbK8fYDvpbdDfaARta8npqJ6kqtmImX+ozhyyv oklZvlJZf6TjZ5t4OGdLajb5uh00+SQoxX08L3eWXDkZL+mfhDncAr8osPC+7KO4y+OTOLDKi8Q nJZI= X-Gm-Gg: ASbGncv4TPXNhVC2w3W9NhmbmSpxSFJBfrrusf/tis91kcp4UdTTZuWrA1wQxL2Fa8f psMjCUtjarpu5JfJ9D9iIvR/mMs0k6uY/PTo+/XRJqxIzfrqVEPmEW7miKrdDWRQKJZZQjeIGVV L7IEgF0pU/BJhay52BfII7F2PkTHvwrOOKUEhwbAlsrYnW4htLoYv8yGZq41gIzRG8Xly0OgUbj 5UJ/hKmKkx4Y56nCABlkJQ5//vpbfTZ85bEbgGDxZEOif8okkMNsZywaU8wIdkt6bfPRE52k11e P/zgfMXvdBwbABMiX9IYWVRbe2W1tXlshfBd5Ax4c4zrlt0AQA3/LgphKHx+4GgU X-Received: by 2002:a17:902:e747:b0:22d:e5ab:5525 with SMTP id d9443c01a7336-22e5ecd2fbdmr52814025ad.38.1746627735896; Wed, 07 May 2025 07:22:15 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:2a60:2bef:3994:10d0:59c9]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30ad474a050sm179453a91.8.2025.05.07.07.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 07:22:15 -0700 (PDT) From: Adhemerval Zanella <adhemerval.zanella@linaro.org> To: libc-alpha@sourceware.org Cc: Carlos O'Donell <carlos@redhat.com> Subject: [PATCH 09/11] locale: Fix UB on add_locale_uint32_array Date: Wed, 7 May 2025 11:17:27 -0300 Message-ID: <20250507142110.3452012-10-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250507142110.3452012-1-adhemerval.zanella@linaro.org> References: <20250507142110.3452012-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org |
Series |
Add initial support for --enable-ubsan
|
expand
|
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index b54fcbbceb..7907c949ea 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -641,6 +641,8 @@ add_locale_uint32_array (struct locale_file *file, { align_locale_data (file, LOCFILE_ALIGN); record_offset (file); + if (n_elems == 0) + return; obstack_grow (&file->data, data, n_elems * sizeof (uint32_t)); maybe_swap_uint32_obstack (&file->data, n_elems); }