mirror of
https://git.busybox.net/busybox.git
synced 2024-11-23 21:53:25 +08:00
ash: use-after-free in bash pattern substitution
Commit daa66ed6
fixed a number of use-after-free bugs in bash pattern
substitution, however one "unguarded" STPUTC remained, which is fixed here.
function old new delta
subevalvar 1564 1576 +12
Signed-off-by: Karsten Sperling <ksperling@apple.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c5682813ab
commit
3e83699ce2
@ -7370,6 +7370,8 @@ subevalvar(char *start, char *str, int strloc,
|
||||
char *restart_detect = stackblock();
|
||||
if (quotes && *loc == '\\') {
|
||||
STPUTC(CTLESC, expdest);
|
||||
if (stackblock() != restart_detect)
|
||||
goto restart;
|
||||
len++;
|
||||
}
|
||||
STPUTC(*loc, expdest);
|
||||
|
Loading…
Reference in New Issue
Block a user