diff options
-rw-r--r-- | shells/tcsh/Makefile | 4 | ||||
-rw-r--r-- | shells/tcsh/distinfo | 3 | ||||
-rw-r--r-- | shells/tcsh/patches/patch-ed.inputl.c | 35 |
3 files changed, 39 insertions, 3 deletions
diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile index 20ad48f3764..dd610d036f3 100644 --- a/shells/tcsh/Makefile +++ b/shells/tcsh/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.84 2017/01/19 18:52:25 agc Exp $ +# $NetBSD: Makefile,v 1.85 2017/02/17 19:21:44 he Exp $ DISTNAME= tcsh-6.20.00 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= shells MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/ MASTER_SITES+= ftp://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/ diff --git a/shells/tcsh/distinfo b/shells/tcsh/distinfo index 49ee5f29324..b8cb0dab821 100644 --- a/shells/tcsh/distinfo +++ b/shells/tcsh/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.38 2016/12/24 13:18:43 kim Exp $ +$NetBSD: distinfo,v 1.39 2017/02/17 19:21:44 he Exp $ SHA1 (tcsh-6.20.00.tar.gz) = a77d68434cc4bed731a46a39b9e01523e3a1e98c RMD160 (tcsh-6.20.00.tar.gz) = 3f119421ef3500cea1bebe2edf35c6d81ca1c8f3 @@ -8,6 +8,7 @@ SHA1 (patch-aa) = 440849534fc49afdbd70b95d6cbc62ff5abee240 SHA1 (patch-ab) = 8cf26988778b5331360eb1aab98bfcc920c71ac2 SHA1 (patch-configure) = 91c2019da8c074bd6f24b84bf798ccd497110727 SHA1 (patch-ed.chared.c) = d26ba00afcba958b5bb1efc2171e6211c8a5f964 +SHA1 (patch-ed.inputl.c) = d91c55ba297fcbe69f09b1ab3a7b50b9d83114c3 SHA1 (patch-nls-catgen) = fe5da1ea0edfcb646bcc271e614f5075afa56c60 SHA1 (patch-sh.func.c) = 030a2647930300f96147715ae17ab95c79ca8ca2 SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e diff --git a/shells/tcsh/patches/patch-ed.inputl.c b/shells/tcsh/patches/patch-ed.inputl.c new file mode 100644 index 00000000000..b8b88a3b35a --- /dev/null +++ b/shells/tcsh/patches/patch-ed.inputl.c @@ -0,0 +1,35 @@ +$NetBSD: patch-ed.inputl.c,v 1.1 2017/02/17 19:21:44 he Exp $ + +Add fix from upstream: Unfortunately the AsciiOnly reversion causes +a SEGV because *ch is used to index in the command array, and now contains +INVALID_BYTE. Reproduce error with: + env -i ./tcsh + <meta>b + +--- ed.inputl.c.orig 2012-10-19 15:23:32.000000000 +0000 ++++ ed.inputl.c +@@ -800,13 +800,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; + } |