tcsh-6.20.00-008-guard-ascii-only-reversion.patch added
> Unfortunately the AsciiOnly reversion causes a SEGV because *ch > is used to index in the command array, and now contains INVALID_BYTE.
This commit is contained in:
parent
0bcd263527
commit
0afb3b852f
43
tcsh-6.20.00-008-guard-ascii-only-reversion.patch
Normal file
43
tcsh-6.20.00-008-guard-ascii-only-reversion.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From 8e6dfd53321a0b0047f7d75db21a946c166c600b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christos Zoulas <christos@zoulas.com>
|
||||||
|
Date: Fri, 17 Feb 2017 11:17:27 -0500
|
||||||
|
Subject: [PATCH] Unfortunately the AsciiOnly reversion causes a SEGV because
|
||||||
|
*ch is used to index in the command array, and now contains INVALID_BYTE. env
|
||||||
|
-i ./tcsh <meta>b
|
||||||
|
|
||||||
|
---
|
||||||
|
ed.inputl.c | 18 +++++++++++-------
|
||||||
|
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ed.inputl.c b/ed.inputl.c
|
||||||
|
index f543a6f..1a0d356 100644
|
||||||
|
--- a/ed.inputl.c
|
||||||
|
+++ b/ed.inputl.c
|
||||||
|
@@ -796,13 +796,17 @@ GetNextChar(Char *cp)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- cbp++;
|
||||||
|
- if (normal_mbtowc(cp, cbuf, cbp) == -1) {
|
||||||
|
- reset_mbtowc();
|
||||||
|
- if (cbp < MB_CUR_MAX)
|
||||||
|
- continue; /* Maybe a partial character */
|
||||||
|
- /* And drop the following bytes, if any */
|
||||||
|
- *cp = (unsigned char)*cbuf | INVALID_BYTE;
|
||||||
|
+ if (AsciiOnly) {
|
||||||
|
+ *cp = (unsigned char)*cbuf;
|
||||||
|
+ } else {
|
||||||
|
+ cbp++;
|
||||||
|
+ if (normal_mbtowc(cp, cbuf, cbp) == -1) {
|
||||||
|
+ reset_mbtowc();
|
||||||
|
+ if (cbp < MB_CUR_MAX)
|
||||||
|
+ continue; /* Maybe a partial character */
|
||||||
|
+ /* And drop the following bytes, if any */
|
||||||
|
+ *cp = (unsigned char)*cbuf | INVALID_BYTE;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -49,6 +49,7 @@ Patch004: tcsh-6.20.00-004-do-not-use-old-pointer-tricks.patch
|
|||||||
Patch005: tcsh-6.20.00-005-reset-fixes-numbering.patch
|
Patch005: tcsh-6.20.00-005-reset-fixes-numbering.patch
|
||||||
Patch006: tcsh-6.20.00-006-cleanup-in-readme-files.patch
|
Patch006: tcsh-6.20.00-006-cleanup-in-readme-files.patch
|
||||||
Patch007: tcsh-6.20.00-007-look-for-tgetent-in-libtinfo.patch
|
Patch007: tcsh-6.20.00-007-look-for-tgetent-in-libtinfo.patch
|
||||||
|
Patch008: tcsh-6.20.00-008-guard-ascii-only-reversion.patch
|
||||||
|
|
||||||
|
|
||||||
# Downstream patches -- these should be always included when doing rebase:
|
# Downstream patches -- these should be always included when doing rebase:
|
||||||
@ -181,6 +182,7 @@ fi
|
|||||||
tcsh-6.20.00-005-reset-fixes-numbering.patch
|
tcsh-6.20.00-005-reset-fixes-numbering.patch
|
||||||
tcsh-6.20.00-006-cleanup-in-readme-files.patch
|
tcsh-6.20.00-006-cleanup-in-readme-files.patch
|
||||||
tcsh-6.20.00-007-look-for-tgetent-in-libtinfo.patch
|
tcsh-6.20.00-007-look-for-tgetent-in-libtinfo.patch
|
||||||
|
tcsh-6.20.00-008-guard-ascii-only-reversion.patch
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.20.00-4
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.20.00-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user