From nobody Sun May 28 18:01:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QTmgC48SWz4XhSN; Sun, 28 May 2023 18:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QTmgC3fssz3ntY; Sun, 28 May 2023 18:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685296871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TqrBpohyXJMvSefS6un9a62eJXJGcdypMI/5Xf+jRw=; b=aSaNmTGbjBSdFSwqjTfDXm8/kFzmq/99Y2U6CFf24DZYu1hqxgHovu4Ku8JRZo6PVEe4f2 u6fuy8T+2pWJQ3GXhdV3dx4bCHFzcZNxMB8GEhyTNpXcq9iXjhGzt5f8ggEqed14glSsTx 5PZJRVo8MLA+U5VaUDziknjiVkyBfDvHwGQC5oCWYPtO2o4mC2QjvtOkOWuegTeOKEqThd 3JEeFvnDDlW+WPEhHWi/dnfsKg/LR9a7+/TpdtSffSEbDTHVEbKUu7+YjizM5Rs2Uky3W2 rp14azbDsNYmQtepDxVw9NLztNu1+ajpCT3UQrWi2TFC6WoNqSRtcq8wNRWDNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685296871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TqrBpohyXJMvSefS6un9a62eJXJGcdypMI/5Xf+jRw=; b=ALh4RLwic0YzdHwZb83u3XupTZZJjjwfOQuHUOjmCL0uJ574d3bGhgl3f2DGEg/c9SAJI3 rIy/c0Wg3Vxpa0hW87ZNkedovZMnzVyPVu9eGjsF2oFEBBjg3hvQ15AkgDJ3zKoeTgV2Gf W5b7ps/qPYXfrb9ACm4ZVMg7VoFT8d6XqbssILF5JYJIFyacKHe9OhSEdNp40o9D/xGp+g Fwh3gcPVm3h/A1Q2Bax/jeS5dHWyUT22sUnSof8xO79bBPFALxqexFvIWxzwum1SBO1Ama Guesq4XaCU+jYkM8A6fdruXTFbcqEzzUjYvwVJrfCYziafVNW8kydW3ZtpdTAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685296871; a=rsa-sha256; cv=none; b=KUAp00+UeAljScxpk9Lbc3fwYx90kjWixhWAlJ1kEuR4KKfe0K7kwL6j27fBh9BZBBJAD4 gmNGFoP/400oQr1ppAQ0tJbj9UJgE5TA/gfp72vn034/sQVJCtvwfg/XTxrb0pxOywLjui pw7kso/DJvN2+zHl6SOWq0BLx/KsuoQ3d92mWi/YS8/NNWdwIAapJc0Zy6ESy97CpG27al VGjpXCRp8z5uizLlaWIRd4JFXFlpwM0GwodV1DORNv3TD3FGcW/DR1LIhjkRWYYcCwanro 4HC3zat8KjBX3qDnvTi8cVhD7p4U3qRLNclfws1n25hsF1TglMuqktgQbUtKqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QTmgC2kplzg4f; Sun, 28 May 2023 18:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34SI1B4t058393; Sun, 28 May 2023 18:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34SI1Biu058392; Sun, 28 May 2023 18:01:11 GMT (envelope-from git) Date: Sun, 28 May 2023 18:01:11 GMT Message-Id: <202305281801.34SI1Biu058392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: e15da6b10a49 - main - libc: locale: fix collation file size validation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e15da6b10a4971f43aa604fca3ea43effa096f4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e15da6b10a4971f43aa604fca3ea43effa096f4c commit e15da6b10a4971f43aa604fca3ea43effa096f4c Author: Kyle Evans AuthorDate: 2023-05-28 17:52:51 +0000 Commit: Kyle Evans CommitDate: 2023-05-28 17:54:24 +0000 libc: locale: fix collation file size validation At a minimum, we need enough for the colllation format version string + locale definition version string and a full collate_info definition, rather than just the first two and a pointer. Sponsored by: Klara, Inc. --- lib/libc/locale/collate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index 8360c62badd4..c4e7d1cddba1 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -159,7 +159,7 @@ __collate_load_tables_l(const char *encoding, struct xlocale_collate *table) } if (sbuf.st_size < (COLLATE_FMT_VERSION_LEN + XLOCALE_DEF_VERSION_LEN + - sizeof (info))) { + sizeof (*info))) { (void) _close(fd); errno = EINVAL; return (_LDP_ERROR);