tcsh-6.19.00-026-quote-backslashes-properly.patch added
Related to BZ: #1301857 > PR/526: David Kaspar: Quote backslashes properly so that they can be > preserved in `` expansions.
This commit is contained in:
parent
1a0ab756e4
commit
1379e36227
53
tcsh-6.19.00-026-quote-backslashes-properly.patch
Normal file
53
tcsh-6.19.00-026-quote-backslashes-properly.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 9a763dd9b9b88f9c8cd235fddfda839c6b7971cb Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 8 Mar 2016 15:45:26 +0000
|
||||
Subject: [PATCH] PR/526: David Kaspar: Quote backslashes properly so that they
|
||||
can be preserved in `` expansions.
|
||||
|
||||
---
|
||||
Fixes | 2 ++
|
||||
sh.glob.c | 4 +++-
|
||||
sh.lex.c | 2 +-
|
||||
3 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 1fe33e8..b182f1a 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,5 @@
|
||||
+ 10. PR/526: Quote backslashes properly so they can be preserved in ``
|
||||
+ expansions
|
||||
9. Fix memory leak for paraml
|
||||
8. Add notempty and ask values for the noclobber setting (Martin Tournoij)
|
||||
7. more correct $wordchars for vimode (Luke Mewburn)
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index dce0217..895a603 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -878,7 +878,9 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
if (!quoted && (c == ' ' || c == '\t'))
|
||||
break;
|
||||
cnt++;
|
||||
- Strbuf_append1(word, c | quoted);
|
||||
+ if (c == '\\' || quoted)
|
||||
+ c |= QUOTE;
|
||||
+ Strbuf_append1(word, c);
|
||||
}
|
||||
/*
|
||||
* Unless at end-of-file, we will form a new word here if there were
|
||||
diff --git a/sh.lex.c b/sh.lex.c
|
||||
index 8a6d1b0..eae8a03 100644
|
||||
--- a/sh.lex.c
|
||||
+++ b/sh.lex.c
|
||||
@@ -386,7 +386,7 @@ loop:
|
||||
*/
|
||||
c |= QUOTE;
|
||||
ungetC(c);
|
||||
- c = '\\';
|
||||
+ c = '\\' | QUOTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
@ -54,6 +54,7 @@ Patch022: tcsh-6.19.00-022-fix-source-command-memory-leak.patch
|
||||
Patch023: tcsh-6.19.00-023-fix-debugging-code.patch
|
||||
Patch024: tcsh-6.19.00-024-use-sysmalloc.patch
|
||||
Patch025: tcsh-6.19.00-025-more-generous-ROUNDUP-_LP64.patch
|
||||
Patch026: tcsh-6.19.00-026-quote-backslashes-properly.patch
|
||||
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
@ -200,6 +201,7 @@ fi
|
||||
tcsh-6.19.00-023-fix-debugging-code.patch
|
||||
tcsh-6.19.00-024-use-sysmalloc.patch
|
||||
tcsh-6.19.00-025-more-generous-ROUNDUP-_LP64.patch
|
||||
tcsh-6.19.00-026-quote-backslashes-properly.patch
|
||||
|
||||
* Thu Apr 21 2016 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 6.19.00-6
|
||||
- Drop tcsh-6.15.00-closem.patch - issue not reproducible, patch not accepted by upstream
|
||||
|
Loading…
Reference in New Issue
Block a user