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: 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: 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 $
|
# $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
|
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R38 2009/05/27
|
@(#)MIRBSD KSH R38 2009/05/31
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
stdin:
|
stdin:
|
||||||
|
12
misc.c
12
misc.c
@ -29,7 +29,7 @@
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#endif
|
#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
|
#undef USE_CHVT
|
||||||
#if defined(TIOCSCTTY) && !defined(MKSH_SMALL)
|
#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);
|
llen = readlink(Xstring(*xsp, xp), lbuf, PATH_MAX - 1);
|
||||||
if (llen < 0) {
|
if (llen < 0) {
|
||||||
/* EINVAL means it wasn't a symlink... */
|
if (errno == EINVAL)
|
||||||
if (errno != EINVAL) {
|
/* not a symbolic link */
|
||||||
xp = NULL;
|
continue;
|
||||||
goto out;
|
xp = NULL;
|
||||||
}
|
goto out;
|
||||||
}
|
}
|
||||||
lbuf[llen] = '\0';
|
lbuf[llen] = '\0';
|
||||||
|
|
||||||
|
4
sh.h
4
sh.h
@ -122,9 +122,9 @@
|
|||||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||||
|
|
||||||
#ifdef EXTERN
|
#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
|
#endif
|
||||||
#define MKSH_VERSION "R38 2009/05/27"
|
#define MKSH_VERSION "R38 2009/05/31"
|
||||||
|
|
||||||
#ifndef MKSH_INCLUDES_ONLY
|
#ifndef MKSH_INCLUDES_ONLY
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user