summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/wprintf.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2017-03-12 18:38:03 +0000
committerjilles <jilles@FreeBSD.org>2017-03-12 18:38:03 +0000
commitfad9bc33a21dea59b9141f4c4a818b8da7940f02 (patch)
tree241f1c36998f139d25db6d4ca988e49053996a94 /lib/libc/stdio/wprintf.c
parentc52ab07b68286c4c43d14217015a2fc847019e99 (diff)
downloadFreeBSD-src-fad9bc33a21dea59b9141f4c4a818b8da7940f02.zip
FreeBSD-src-fad9bc33a21dea59b9141f4c4a818b8da7940f02.tar.gz
MFC r314686: sh: Fix crash if a -T trap is taken during command substitution
Code like t=$(stat -f %m "$file") segfaulted if -T was active and a trap was taken while the shell was waiting for the child process to finish. What happened was that the dotrap() call in waitforjob() was hit. This re-entered command execution (including expand.c) at a point not expected by expbackq(), and global state (unallocated stack string and argbackq) was corrupted. To fix this, change expbackq() to prepare for command execution to be re-entered. Reported by: bdrewery
Diffstat (limited to 'lib/libc/stdio/wprintf.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud