rpms/tcsh/FC-4 tcsh-6.14.00-wide-crash.patch,NONE,1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Feb 28 02:43:35 UTC 2006
Author: mitr
Update of /cvs/dist/rpms/tcsh/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv24148
Added Files:
tcsh-6.14.00-wide-crash.patch
Log Message:
* Tue Feb 28 2006 Miloslav Trmac <mitr at redhat.com> - 6.14-1.fc4.2
- Fix a crash when reading scripts with multibyte characters (#183267)
tcsh-6.14.00-wide-crash.patch:
sh.lex.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
--- NEW FILE tcsh-6.14.00-wide-crash.patch ---
--- tcsh-6.14.00/sh.lex.c.wide-crash 2006-02-28 03:34:58.000000000 +0100
+++ tcsh-6.14.00/sh.lex.c 2006-02-28 03:35:31.000000000 +0100
@@ -1710,13 +1710,13 @@
break;
partial += r;
i = 0;
- while (i < partial) {
+ while (i < partial && nchars != 0) {
int len;
len = normal_mbtowc(buf + res, cbuf + i, partial - i);
if (len == -1) {
reset_mbtowc();
- if (partial < MB_LEN_MAX && r > 0)
+ if (partial - i < MB_LEN_MAX && r > 0)
/* Maybe a partial character and there is still a chance
to read more */
break;
@@ -1735,7 +1735,7 @@
if (i != partial)
memmove(cbuf, cbuf + i, partial - i);
partial -= i;
- } while (partial != 0);
+ } while (partial != 0 && nchars != 0);
/* Throwing away possible partial multibyte characters on error */
return res != 0 ? res : r;
}
More information about the fedora-cvs-commits
mailing list