From nobody Wed Feb 9 00:48:13 2022 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 04B3519B7482; Wed, 9 Feb 2022 00:48:15 +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 4Jth7f0fk6z4tYZ; Wed, 9 Feb 2022 00:48:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367695; 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=HSUyEEhAzPzIO8m6xCaw/uG6TfSymDjUBsa0bdMuolo=; b=E9oWmMMkeolbXAzNptmSorda+1dPeP4T3EAwdEAs+maELV65Rm0BDsPnL6whA9dS7cAcGk hQkxNHcyBRARxxwSQD6w4oBU5g8g3+jHA8W4Mst/7nahhM9qXAv3sm8L0cuKEwQHV9QbLC sYsKtQ5gsfULdRbC3sgqp0VkXbOd93stI5p+wN6TkXKSkVOSfcIioE5+xw6qw6UNOd10HQ 7ZlGtYfXWg1NiH54f59M7KwkbVzwnGdhA3330XoW/oBntuXC0BlIGOoHgxmjAgsDXdwy5E tB71OuwDOFI0tsoWhCeRubZ7RsgYwagdFiLKAhFqYGZT6mSMs1BU/xwUULL5Yw== 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 6D06C23A14; Wed, 9 Feb 2022 00:48:13 +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 2190mDLj083841; Wed, 9 Feb 2022 00:48:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2190mDTJ083840; Wed, 9 Feb 2022 00:48:13 GMT (envelope-from git) Date: Wed, 9 Feb 2022 00:48:13 GMT Message-Id: <202202090048.2190mDTJ083840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7570b8407958 - stable/13 - __messages_load(): check for calloc() failure 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7570b84079587304058678848a5478784d278c2a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367695; 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=HSUyEEhAzPzIO8m6xCaw/uG6TfSymDjUBsa0bdMuolo=; b=EhkBc6jwsuhwb0Bh7uW5uZRidaBXXC1YAeN2YStEst2FPYdmakXskYu6NB4XxWW7WSeVlI cT71fIN5qiDTqyhNgMq1fTpTANu6C0tfhbm8Cjbfg5lUPaKizIAelrWOnTpM5mm1qW91X1 TYCj28WrQFBscf5hrvem1QMOjO4JuLo6xRENVIU0eL2rD0V2ysR0xC3xb8l1+eWJxnqHSt ZZDmYJNJUSm3SlpzLFrvDg4xGI4dhwn9x5EpsPlVsUeKJrlfx5XpeV+kQEDbOgqN+hHiNi kD3zQFIzosTvtRpMPAEtdtlWoYJt+Ko3STa0/35W6ZTI0rSCdIdkGe6HoZJamg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644367695; a=rsa-sha256; cv=none; b=hAzOHxUahEKV2GwuotbSLl7fEJFd2ZEHFW0cVzcEafEVXho/3fTh1UKZSYQJP+yx4dgT06 csR5P6yV44Hygkn40vyaNicdqenKwPHv/qwbuxDmeY1z3CScw1Asu4xtZZ1HlK2J+GLohO j8f21X/nK8ecd6LuOnVtVnL20+Ia4lZbqfCmO2bNCFHXN9WJWqvOPe7BssvOFrf5t9FIKx 1OAaMVsLIu7vt+9KwILzy+LLjehB2OK+eNvluO614FGQjLtsAaEWbe9HB2Ppxw5ifM8p8c FJH1Ebk6tC6BdFu5va1dYe5w16MhE8y/KE83RZ7/9buXLpPEx4dnX/en9rdybg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7570b84079587304058678848a5478784d278c2a commit 7570b84079587304058678848a5478784d278c2a Author: Konstantin Belousov AuthorDate: 2022-02-02 18:07:42 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-09 00:42:45 +0000 __messages_load(): check for calloc() failure (cherry picked from commit bc9ce839f9811ee9e3990bb26c00031a84fa50bd) --- lib/libc/locale/lmessages.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/locale/lmessages.c b/lib/libc/locale/lmessages.c index fd00fc16a4ea..70de30650346 100644 --- a/lib/libc/locale/lmessages.c +++ b/lib/libc/locale/lmessages.c @@ -101,6 +101,8 @@ __messages_load(const char *name, locale_t l) { struct xlocale_messages *new = calloc(sizeof(struct xlocale_messages), 1); + if (new == NULL) + return (NULL); new->header.header.destructor = destruct_messages; if (messages_load_locale(new, &l->using_messages_locale, name) == _LDP_ERROR) {