From 86d4dee0da8c82c36caa2d77c8c1a0033f0d2be4 Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 5 Dec 2009 19:44:09 +0000 Subject: [PATCH] valgrind (thanks ciruZ for trying) found uninitialised memory use in utf_skipcols by x_goto --- lex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lex.c b/lex.c index c8782a8..1dbd53a 100644 --- a/lex.c +++ b/lex.c @@ -22,7 +22,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.101 2009/11/21 23:23:18 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.102 2009/12/05 19:44:09 tg Exp $"); /* * states while lexing word @@ -1326,7 +1326,7 @@ getsc_line(Source *s) /* Done here to ensure nothing odd happens when a timeout occurs */ XcheckN(s->xs, xp, LINE); - *xp = '\0'; + memset(xp, 0, LINE); s->start = s->str = xp; if (have_tty && ksh_tmout) {