Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 2021 11:05:57 GMT
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: bee62aa5a69f - stable/13 - sh: silence sanitizer
Message-ID:  <202105051105.145B5vs4043363@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by pstef:

URL: https://cgit.FreeBSD.org/src/commit/?id=bee62aa5a69f808bf7503e6d5d9ff375240511a2

commit bee62aa5a69f808bf7503e6d5d9ff375240511a2
Author:     Piotr Pawel Stefaniak <pstef@FreeBSD.org>
AuthorDate: 2021-04-01 05:31:03 +0000
Commit:     Piotr Pawel Stefaniak <pstef@FreeBSD.org>
CommitDate: 2021-05-05 11:04:58 +0000

    sh: silence sanitizer
    
    (cherry picked from commit 5a18515b3143792135881ce64e2380115c4744c1)
---
 bin/sh/memalloc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c
index a2191771386d..7ea31af050e5 100644
--- a/bin/sh/memalloc.c
+++ b/bin/sh/memalloc.c
@@ -227,7 +227,10 @@ popstackmark(struct stackmark *mark)
 	}
 	stacknxt = mark->stacknxt;
 	stacknleft = mark->stacknleft;
-	sstrend = stacknxt + stacknleft;
+	if (stacknleft != 0)
+		sstrend = stacknxt + stacknleft;
+	else
+		sstrend = stacknxt;
 	INTON;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105051105.145B5vs4043363>