diff options
author | Denys Vlasenko | 2017-02-03 13:00:06 +0100 |
---|---|---|
committer | Denys Vlasenko | 2017-02-03 13:00:06 +0100 |
commit | 5f7c82b32f548b5a1d6a4186630e8ef496a9d5e6 (patch) | |
tree | ae428320fbd98b457b8feef655947cbb753a93f8 | |
parent | b6871c1965af0eb87123e13f5d81ec0c9b801b71 (diff) | |
download | busybox-5f7c82b32f548b5a1d6a4186630e8ef496a9d5e6.zip busybox-5f7c82b32f548b5a1d6a4186630e8ef496a9d5e6.tar.gz |
ash: add INT_OFF/ON around allocations
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 6be3ec6..983f7b1 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -12686,7 +12686,7 @@ dotcmd(int argc_ UNUSED_PARAM, char **argv_ UNUSED_PARAM) fullname = find_dot_file(argv[0]); argv++; args_need_save = argv[0]; - if (args_need_save) { /* . FILE ARGS, ARGS exist */ + if (args_need_save) { /* ". FILE ARGS", and ARGS are not empty */ int argc; saveparam = shellparam; shellparam.malloced = 0; @@ -13480,7 +13480,7 @@ procargs(char **argv) #if DEBUG == 2 debug = 1; #endif - /* POSIX 1003.2: first arg after -c cmd is $0, remainder $1... */ + /* POSIX 1003.2: first arg after "-c CMD" is $0, remainder $1... */ if (xminusc) { minusc = *xargv++; if (*xargv) @@ -13661,9 +13661,11 @@ int ash_main(int argc UNUSED_PARAM, char **argv) if (!hp) { hp = lookupvar("HOME"); if (hp) { + INT_OFF; hp = concat_path_file(hp, ".ash_history"); setvar0("HISTFILE", hp); free((char*)hp); + INT_ON; hp = lookupvar("HISTFILE"); } } |