Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh PR/22640: Paul Jarc: sh mishandles positional paramet...
details: https://anonhg.NetBSD.org/src/rev/d63c09ab2dc3
branches: trunk
changeset: 552061:d63c09ab2dc3
user: christos <christos%NetBSD.org@localhost>
date: Wed Sep 17 16:01:19 2003 +0000
description:
PR/22640: Paul Jarc: sh mishandles positional parameters in case. Fixed
from FreeBSD PR 56147.
diffstat:
bin/sh/expand.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 67b603e2ba2c -r d63c09ab2dc3 bin/sh/expand.c
--- a/bin/sh/expand.c Wed Sep 17 14:16:22 2003 +0000
+++ b/bin/sh/expand.c Wed Sep 17 16:01:19 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.57 2003/08/07 09:05:32 agc Exp $ */
+/* $NetBSD: expand.c,v 1.58 2003/09/17 16:01:19 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
#else
-__RCSID("$NetBSD: expand.c,v 1.57 2003/08/07 09:05:32 agc Exp $");
+__RCSID("$NetBSD: expand.c,v 1.58 2003/09/17 16:01:19 christos Exp $");
#endif
#endif /* not lint */
@@ -608,7 +608,7 @@
int easy;
int quotes = flag & (EXP_FULL | EXP_CASE);
- varflags = *p++;
+ varflags = (unsigned char)*p++;
subtype = varflags & VSTYPE;
var = p;
special = 0;
@@ -643,7 +643,8 @@
if (set && subtype != VSPLUS) {
/* insert the value of the variable */
if (special) {
- varvalue(var, varflags & VSQUOTE, flag & EXP_FULL);
+ varvalue(var, varflags & VSQUOTE,
+ flag & (EXP_FULL|EXP_CASE));
if (subtype == VSLENGTH) {
varlen = expdest - stackblock() - startloc;
STADJUST(-varlen, expdest);
Home |
Main Index |
Thread Index |
Old Index