mirror of
https://salsa.debian.org/debian/dash.git
synced 2026-01-26 07:37:51 +00:00
Apply upstream patch to fix here-doc handling
This commit is contained in:
parent
f48383dffe
commit
4450adbc8b
27
debian/patches/0023-parser-Fix-here-doc-EOF-marker-bug-with-negative-cha.patch
vendored
Normal file
27
debian/patches/0023-parser-Fix-here-doc-EOF-marker-bug-with-negative-cha.patch
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
From: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Fri, 24 May 2024 22:41:00 +0800
|
||||
Subject: parser: Fix here-doc EOF marker bug with negative chars
|
||||
|
||||
The here-document EOF marker parsing code incorrectly treats all
|
||||
negative bytes as EOF instead of just PEOF. Fix this by testing
|
||||
against PEOF.
|
||||
|
||||
Fixes: 81daadfce8d5 ("[PARSER] Removed noexpand/length check on eofmark")
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
---
|
||||
src/parser.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/parser.c b/src/parser.c
|
||||
index a552c47..81a3cdb 100644
|
||||
--- a/src/parser.c
|
||||
+++ b/src/parser.c
|
||||
@@ -1122,7 +1122,7 @@ more_heredoc:
|
||||
len = out - p;
|
||||
|
||||
if (len) {
|
||||
- len -= c < 0;
|
||||
+ len -= c <= PEOF;
|
||||
c = p[-1];
|
||||
|
||||
if (len) {
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -11,4 +11,5 @@
|
||||
0020-Update-manpages.patch
|
||||
0021-jobs-Implement-pipefail-option.patch
|
||||
0022-builtin-Align-test-nt-and-ot-with-POSIX.1-2024.patch
|
||||
0023-parser-Fix-here-doc-EOF-marker-bug-with-negative-cha.patch
|
||||
9001-Add-privmode.diff
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user