summary refs log tree commit diff
path: root/src/show.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-11-28 21:09:51 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-11-28 21:09:51 +0800
commit49a94e2bab1e4f601a9fbdf9615d9e4e0150e412 (patch)
tree4d1deb22392a4c3668037332e0c4f973e26d0fff /src/show.c
parent[SIGNAL] Mark status as volatile in exitshell (diff)
downloaddash-49a94e2bab1e4f601a9fbdf9615d9e4e0150e412.tar.gz
dash-49a94e2bab1e4f601a9fbdf9615d9e4e0150e412.zip
[EXPAND] Free IFS state in evalbackcmd
On Sun, Nov 07, 2010 at 04:04:20PM -0600, Jonathan Nieder wrote:
> 
> Herbert Xu wrote:
> 
> > commit f42e443bb511ed3224f09b4fcf0772438ebdbbfa
> > Author: Herbert Xu <herbert@gondor.apana.org.au>
> > Date:   Wed Sep 8 20:07:26 2010 +0800
> > 
> >     [EXPAND] Fix ifsfirst/ifslastp leak
> 
> Another puzzle bisecting to f42e443bb.  This one comes from the
> grub-mkconfig script:
> 
>  $ sh -c 'datadir=/usr/share; pkgdatadir=${datadir}/`cat`' 2>&1 | cat -A
>  cat: M-^\^M^F^HM-4^M^F^HM-(^M^F^H: No such file or directory$
>  cat: M-(^M^F^H: No such file or directory$
> 
> Still reproducible with 016b529.  I'll try to find time to look into
> it, but thought you might like to know nevertheless.

This is the symptom of another leak.  In this case evalbackcmd
occurs in the middle of an expansion (as it should) but the forked
child never clears the previous IFS state.

This patch adds the missing ifsfree call.

This wasn't as much of a problem as the previously discovered leaks
since all it means is that the child gets to carry around the parent's
expansion state and the child is usually short-lived.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
t/commit/ui.c?h=catgirl&id=8d873c71ede2ac1c0da4139d6fb9daf5d8c83f1e&follow=1'>Support monochromatic terminalsJune McEnroe 2020-02-11Add .gz to chroot-man scriptJune McEnroe 2020-02-11Add -R restricted flagJune McEnroe 2020-02-11Add chroot targetJune McEnroe 2020-02-11Exit focus and paste modes on err exitJune McEnroe 2020-02-11Add startup GPLv3 note and URLJune McEnroe 2020-02-11Make sure -D_GNU_SOURCE ends up in CFLAGS on LinuxJune McEnroe 2020-02-11Add note about setting PKG_CONFIG_PATHJune McEnroe 2020-02-11Rename query ID on nick changeJune McEnroe 2020-02-11Call completeClear when closing a windowJune McEnroe 2020-02-11Don't insert color codes for non-mentionsJune McEnroe 2020-02-11Take first two words in colorMentionsJune McEnroe 2020-02-11Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe