put the hyphen-minus back into the allowed alias name characters, for

Steffen Nurpmeso <steffen@sdaoden.eu>, except disallow it at the start
This commit is contained in:
tg
2017-04-06 19:02:07 +00:00
parent 6f991beb90
commit cadc884008
3 changed files with 8 additions and 7 deletions

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.336 2017/04/06 01:59:55 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.337 2017/04/06 19:02:05 tg Exp $");
#if HAVE_KILLPG
/*
@ -850,7 +850,7 @@ c_alias(const char **wp)
strndupx(xalias, alias, val++ - alias, ATEMP);
alias = xalias;
}
if (!valid_alias_name(alias)) {
if (!valid_alias_name(alias) || *alias == '-') {
bi_errorf(Tinvname, alias, Talias);
afree(xalias, ATEMP);
return (1);