From 25d9b91d94688b9b022224b95c06cbd4b75da085 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 13 Jan 2010 18:22:35 +0100 Subject: shell/read: check that variable names are sane function old new delta shell_builtin_read 1000 1055 +55 parse_command 1460 1463 +3 builtin_umask 121 123 +2 is_well_formed_var_name 73 66 -7 Signed-off-by: Denys Vlasenko --- shell/hush.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'shell/hush.c') diff --git a/shell/hush.c b/shell/hush.c index bb0ab8408..810009ae8 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -893,16 +893,6 @@ static void cmdedit_update_prompt(void); /* Utility functions */ -static int is_well_formed_var_name(const char *s, char terminator) -{ - if (!s || !(isalpha(*s) || *s == '_')) - return 0; - s++; - while (isalnum(*s) || *s == '_') - s++; - return *s == terminator; -} - /* Replace each \x with x in place, return ptr past NUL. */ static char *unbackslash(char *src) { -- cgit v1.2.3