From nobody Wed Jun 21 02:39:35 2023 X-Original-To: dev-commits-src-branches@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 4Qm74l441Yz4gJXG; Wed, 21 Jun 2023 02:39:35 +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 4Qm74l3QNNz3CZP; Wed, 21 Jun 2023 02:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687315175; 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=9rYNgBOzZABSc7Vv5AC4C/vDkI8XdQQpEA1pXMfzoUM=; b=Rn4FQQetFNOB7fJhLo3xR3hmRFmpBfvY7Uaafui+9bdl4Qqbk67XAvBbwa8UvWN9NWl8zs 6g3XH/r1Nkcx6t0NQnsdbIWPqpHk4jwLaQgAT8zhbVEyuk31n8e4tRpwVVNm3Ta5Q7Bq0O 3+Wsl3bH7kTIKgjrsfhTnWolFDRZWracyE670dYw6LfBYjdJVlH+lO8yR7G5yjQaBoUrf8 ezyt5HeT9xAA81Kvs7yCYAaItAYeINOzAmwKQp8D6ctQ7nMbemoJj3ADJSlW8tk2SOq1tW 0nMk0gCyl8kOhb23WllM2DWqC4qUu89VdwaWQ7oyBeiAszugjZxlGmft5US2ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687315175; 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=9rYNgBOzZABSc7Vv5AC4C/vDkI8XdQQpEA1pXMfzoUM=; b=evAquVZylJApVs9tkX2i+FLf8+3122tNFtYkwydcgUIzIg/cKl8YXVWzNkIxREeq97eRx8 XDyviAZqUuiEd+FI2z0jbQblyClYpok8cTCIwZIwrqHiZo8uDVZJBSvKgQtVw2aHSdCY4u 9aIl0N145QHy1sZdl7p25SnoipAC3d335AwtpDI4OEoveKsFfQs4InBKIMZ0x9b8H++FbP n+bf+2KF6PMdmOOt1MHDjzSRnNWhDbd5burJYXGJxFftwczODWrS7L62MqjX8yy7VJ7MXI o4VpJBk6kIzXnsyveoPQhXSJTCzbnFxa/KMUFGJxFwbNiufQVryPg/Z7WE4Brw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687315175; a=rsa-sha256; cv=none; b=c77jUnmc/LBHrwzGXrf54ITMgG0wiy8J+jL6fYvzKPScg5L66RTGuob82QQIHBTRMmmAKV HFVHFreNon2J1cIC7890g3yl2dTvlSSQOJS+lU9A0j+bffYEqFZtwDtSP8Qv+XKapKplwx ku/h5JuWKf9o1ADPqcwnFmf+UeVknLZT+laADw/R9AMA+xGci97aS/n2uHN21KwHXmkDW9 0d3EBQ4NrPlFXRo8+errdWrN267varNcKUTzhOUQl5WlxKTG1XliR3/ANYzHW0wZFs+35q cl/7yymjI9fQLgRyceCnbhI64XiicwsF9VuZs1/Xg4qGDJhw8JnFK8dU2et+aA== 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 4Qm74l2WKCzPS6; Wed, 21 Jun 2023 02:39:35 +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 35L2dZel049325; Wed, 21 Jun 2023 02:39:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35L2dZwK049323; Wed, 21 Jun 2023 02:39:35 GMT (envelope-from git) Date: Wed, 21 Jun 2023 02:39:35 GMT Message-Id: <202306210239.35L2dZwK049323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a977fb7c841a - stable/13 - libc: locale: fix collation file size validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a977fb7c841a4e4b87ab8c94d48d0e342aa47014 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a977fb7c841a4e4b87ab8c94d48d0e342aa47014 commit a977fb7c841a4e4b87ab8c94d48d0e342aa47014 Author: Kyle Evans AuthorDate: 2023-05-28 17:52:51 +0000 Commit: Kyle Evans CommitDate: 2023-06-20 20:11:48 +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. (cherry picked from commit e15da6b10a4971f43aa604fca3ea43effa096f4c) --- 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 2f0e2003aa45..c3b66e1f0534 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -148,7 +148,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);