From nobody Wed May 22 13:23:20 2024 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 4VksSS5MlLz5LjF5; Wed, 22 May 2024 13:23:20 +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 4VksSS3xYZz43T8; Wed, 22 May 2024 13:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384200; 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=rERo10kJVv7BymmKkdEJPQhP//YR6OK+gvvB9FC30pM=; b=Zpkcv9wj0qR6D8VaH1g1xwr40jHY309FCkxC3E+dYpWeA86ltrL19GwH5p6e9G9Z8vtmCp R9UmHmXWP7ePqvaGA3RXlhznO9+J02ciCPeh5aFL4CQxwFD3usGL1x+Di3/GLoM1X/6eMO CtuRuheNnpmz8XGPcZskcsM25K82jv4y0adFpvatOOGOG2rv9pv1rcgmooEWjfte4/Gl3t GEj1ROdEdq5eHzzUZSbK6buqq5827wk2iFFADqo36/QoQbk3+uXt9skjNk8cJmnu4z30lb GsuuBauAdJJmb8/g5llURf1v9UcfnxwAdBvWsZKw2xfKrTdNuf1H6XdUe4VpFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384200; a=rsa-sha256; cv=none; b=lnWEaOg3L8snpfH+qe1TNeAmkSRb26F1LpNuVf60A4Isb++rlgfVVff77aq/AXaIWJt99+ XeQh9+Mct2s7JcWWyHv9QuQuNKK98yCZ9v3S9MmexCZF6rnzZ5FOu3fSnQGxFzhk1Bg53k Yzq+xpbW+B3mKmBdAHdegI0vlPG4Cuo+hoO5pGPg5r2nqOStTG916EyL2D0XbtU8yIRy93 OnKjlJlAuUygyrITgyUBtv2te80uVGlRkWN6B6cIDkO9+9XxnCAu+v4sSpGTlmUFAhEjaK RdOcizbJrdzXRwDrB+saBd0BFcwiaz9QEBxc89z1mw7vhFPyhurV6yikjBXdng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384200; 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=rERo10kJVv7BymmKkdEJPQhP//YR6OK+gvvB9FC30pM=; b=nLM3mes6Oe07KEHQQKYRzSRhx1gKB6JfDJW9pysz3mP7rb1LidfMAjtIIqicBVvWg4P1BQ KSidb3hz2Z/O2Ju9PLiU8XUH5edX3wf62Px366JPqkgkC/911mMczPt7JJ3T1CKHfAdr2D 4AOSeZsopKjDjHBBp3jzuRM/yywQqnm7Oe7u6k2VaZxrIVIFcp+uarYi0971P91dejCvW6 rs7rlJH9h5lBtRBuq0XfXF4UfTQIUENGiAYyVM4ZfvPdnWvrhLzVMc+hdyCqqDqe++rkq5 49DAPbxKBU7YM333xm18v9GkAhqcvynL5Cm//BZeLDsZXVZr+mRmoY2ZB8lOgA== 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 4VksSS3Yspz16pH; Wed, 22 May 2024 13:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNK6b098797; Wed, 22 May 2024 13:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNKxh098794; Wed, 22 May 2024 13:23:20 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:20 GMT Message-Id: <202405221323.44MDNKxh098794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 8d3f96bd85c9 - releng/14.1 - sound: Correctly check nvlist_unpack() error 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8d3f96bd85c9519cef76d0727b00082354a2134b Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8d3f96bd85c9519cef76d0727b00082354a2134b commit 8d3f96bd85c9519cef76d0727b00082354a2134b Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:33 +0000 Commit: Christos Margiolis CommitDate: 2024-05-22 13:22:40 +0000 sound: Correctly check nvlist_unpack() error The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 (cherry picked from commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a) (cherry picked from commit 45feaa73c68011bbba647d1eb6f86a166a0453e9) Approved by: re (cperciva) --- sys/dev/sound/pcm/sndstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index eb5c68c7c519..2d66d8760327 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -706,7 +706,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl) } *nvl = nvlist_unpack(nvlbuf, nbytes, 0); free(nvlbuf, M_DEVBUF); - if (nvl == NULL) { + if (*nvl == NULL) { return (EINVAL); }