From nobody Sat Jun 03 21:10:19 2023 X-Original-To: dev-commits-src-all@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 4QYXZg4Qg5z4YZPx; Sat, 3 Jun 2023 21:10:19 +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 4QYXZg3jVxz47kp; Sat, 3 Jun 2023 21:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685826619; 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=aYeV7rC6xEqASzIivU6akFI1r3MuERM0lHHym/6cMiM=; b=fE6RL1LLPVNiQx66/WCRNb8VWR4SLTphAGzJBjmunB0G63cVUv8qnDomvP25CLQgW2y0nS W64We6fqkZQbL423FT3i6mlj0aWPoaUMh55lZ0MYoeguoj16Taulg+PqFu5aWCaMsdKULg UqfN4oj30MdiuCCqqzwDPG2njfbF0PJjmrT/jLNX/AN5u2BnbV4p3w4h/9vGCdeq0DBzAc W4U6m7tbqADEy2S98kQUhaICtr1xDrGbVfu0X6HtRUqhSy+NSub/ujDFslAzgp71A5WgfK wiKVgc3X8s1KNrQQN+Wre7qf2r/+EDLWgbYHnIdvWttHt4BrNiZNkZkGbsVKpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685826619; 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=aYeV7rC6xEqASzIivU6akFI1r3MuERM0lHHym/6cMiM=; b=B2rw5LRA0QqP08CNf+JndhVYjnRJy3tS2e7KzmhacNnCcBTylKrgdubGU/1YFiEGX+OJLB V7/6Z+mRQ5OwFPshB2mvLrFXI4LJ7BvSj1wyVxmDAxxohodxMEyi2ILbtdqnqKBc4vuQnF qWDBsa/zPFlY45TXZSIj0sTdrj+uEj0Hi+t689/q7qyYp7NwlvTrMTIzLUbEPUtijokC1d aiY/KElTped1OQdNUIsyuvnrr7cDwi/hTRSjhKhXW2MbrKT6EiOelFzwifZDVtrUhtzPQh eC7KbApoRoro4wIZ9WhNHdJNPL8o3yGY9761WFeoj/6sXSUMFdWnSqfpYQYfUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685826619; a=rsa-sha256; cv=none; b=L1UgqTbSWzW5tQKpmJBMcz6AzbaNhp5NIGxnB8ymf5HHw38WBrQoWLv4XT1ycXa7H6Wfin lwoZiMURLwNZO5KM8+XEe3RPolxmXL7aKunDNUhE5Lqo67KjEl4iVM1VrKJ3UbRlsBMwt3 xa6CWwsep72XS3J8wjbeslVGoW56T4C2Cb9YTzf7bOEKmBB2AOnwNPLZ0y/u6Q6hJTjp9Q 5caTHVsSYqjLpVLnmUFdTpOb2pC+uwiSgVJ/eq29A0SnaJH0HgfDzugVTTTVH2UII/f95q PaO2TFXD5IQ2YCBzJJcGAZdYBZLmI4oXnc223oBG7q2rOl1+MNYBBXWAgr+L0g== 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 4QYXZg2lh5zgBj; Sat, 3 Jun 2023 21:10:19 +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 353LAJsZ026290; Sat, 3 Jun 2023 21:10:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 353LAJjo026289; Sat, 3 Jun 2023 21:10:19 GMT (envelope-from git) Date: Sat, 3 Jun 2023 21:10:19 GMT Message-Id: <202306032110.353LAJjo026289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: fa6fa98ac712 - main - sh(1): initialize smark to zero in main() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa6fa98ac712e48fe8e9bca1295b1c54cf744724 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fa6fa98ac712e48fe8e9bca1295b1c54cf744724 commit fa6fa98ac712e48fe8e9bca1295b1c54cf744724 Author: Daniel Kolesa AuthorDate: 2023-06-03 21:08:56 +0000 Commit: Baptiste Daroussin CommitDate: 2023-06-03 21:09:31 +0000 sh(1): initialize smark to zero in main() As popstackmark may be called on this without pushstackmark having been called, we need to initialize it so that we don't get a bogus comparison inside popstackmark, which would have resulted in a NULL pointer dereference. MFC After: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40413 --- bin/sh/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/main.c b/bin/sh/main.c index bc87440807b2..a77f9528064d 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -100,7 +100,7 @@ static char *find_dot_file(char *); int main(int argc, char *argv[]) { - struct stackmark smark, smark2; + struct stackmark smark = {0}, smark2; volatile int state; char *shinit;