fix bug exhibited by t0000-basic.sh introduced in R38 shortly before the
release: sometimes, a “cd -P” would cause memory corruption because lalloc internal data was overwritten due to accidentally losing a “continue;”
This commit is contained in:
parent
cda3cc93f1
commit
16c47bbe91
4
check.t
4
check.t
|
@ -1,4 +1,4 @@
|
|||
# $MirOS: src/bin/mksh/check.t,v 1.281 2009/05/27 19:52:35 tg Stab $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.282 2009/05/31 15:10:06 tg Stab $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
|
@ -25,7 +25,7 @@
|
|||
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R38 2009/05/27
|
||||
@(#)MIRBSD KSH R38 2009/05/31
|
||||
description:
|
||||
Check version of shell.
|
||||
stdin:
|
||||
|
|
12
misc.c
12
misc.c
|
@ -29,7 +29,7 @@
|
|||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.107 2009/05/27 09:58:23 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.108 2009/05/31 15:10:07 tg Exp $");
|
||||
|
||||
#undef USE_CHVT
|
||||
#if defined(TIOCSCTTY) && !defined(MKSH_SMALL)
|
||||
|
@ -1331,11 +1331,11 @@ do_phys_path(XString *xsp, char *xp, const char *pathl)
|
|||
|
||||
llen = readlink(Xstring(*xsp, xp), lbuf, PATH_MAX - 1);
|
||||
if (llen < 0) {
|
||||
/* EINVAL means it wasn't a symlink... */
|
||||
if (errno != EINVAL) {
|
||||
xp = NULL;
|
||||
goto out;
|
||||
}
|
||||
if (errno == EINVAL)
|
||||
/* not a symbolic link */
|
||||
continue;
|
||||
xp = NULL;
|
||||
goto out;
|
||||
}
|
||||
lbuf[llen] = '\0';
|
||||
|
||||
|
|
4
sh.h
4
sh.h
|
@ -122,9 +122,9 @@
|
|||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.304 2009/05/27 19:52:38 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.305 2009/05/31 15:10:07 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R38 2009/05/27"
|
||||
#define MKSH_VERSION "R38 2009/05/31"
|
||||
|
||||
#ifndef MKSH_INCLUDES_ONLY
|
||||
|
||||
|
|
Loading…
Reference in New Issue