diff --git a/tcsh-6.18.01-history-stderror-jmp.patch b/tcsh-6.18.01-history-stderror-jmp.patch index 90d2122..f472a6e 100644 --- a/tcsh-6.18.01-history-stderror-jmp.patch +++ b/tcsh-6.18.01-history-stderror-jmp.patch @@ -25,25 +25,32 @@ } cleanup_push(&unit, open_cleanup); -@@ -2229,6 +2231,7 @@ dosource_flg(Char **t, struct command *c +@@ -2225,7 +2227,7 @@ dosource(Char **t, struct command *c) + int + dosource_flg(Char **t, struct command *c, int flg) + { +- Char *f; ++ Char *f, **globbed; char *file; int fd; int newflg = 0; -+ size_t omark; - - USE(c); - t++; -@@ -2249,9 +2252,12 @@ dosource_flg(Char **t, struct command *c +@@ -2248,12 +2253,17 @@ dosource_flg(Char **t, struct command *c + cleanup_push(file, xfree); xfree(f); t = glob_all_or_error(t); - cleanup_push(t, blk_cleanup); -+ omark = cleanup_push_mark(); +- cleanup_push(t, blk_cleanup); ++ globbed = t; ++ cleanup_push(globbed, blk_cleanup); fd = srcfile(file, 0, (flg | newflg), t); - if ((!fd) && (!newflg) && (!bequiet)) + if ((!fd) && (!newflg) && (!bequiet)) { -+ omark = cleanup_push_mark(); ++ (void)cleanup_push_mark(); stderror(ERR_SYSTEM, file, strerror(errno)); + } /* We need to preserve fd and it's cleaning routines on the top of the * cleaning stack. Don't call cleanup_until() but clean it manually. */ ++ cleanup_ignore(globbed); ++ blk_cleanup(globbed); cleanup_ignore(file); + xfree(file); + diff --git a/tcsh-6.18.03-history-merge.dif b/tcsh-6.18.03-history-merge.dif index 7e81107..35737e3 100644 --- a/tcsh-6.18.03-history-merge.dif +++ b/tcsh-6.18.03-history-merge.dif @@ -40,7 +40,7 @@ } #define USE_JENKINS_HASH 1 -@@ -1353,5 +1353,16 @@ void +@@ -1358,5 +1358,16 @@ void sethistory(int n) { histlen = n; diff --git a/tcsh.changes b/tcsh.changes index aaa099d..5a05c9c 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 14 08:34:04 UTC 2019 - Dr. Werner Fink + +- Fix patch tcsh-6.18.01-history-stderror-jmp.patch to avoid + breaks in sourcing standard system files (boo#1153839) + ------------------------------------------------------------------- Thu Sep 26 07:39:20 UTC 2019 - Dr. Werner Fink