[ld, testsuite] Don't print to stdin for "readelf -w" to avoid buffer overflow
Andreas Schwab
schwab@linux-m68k.org
Sat Feb 4 08:58:00 GMT 2017
On Feb 03 2017, Jiong Wang <jiong.wang@foss.arm.com> wrote:
> diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp
> index 5620f3c..3fb4bd7 100644
> --- a/ld/testsuite/ld-elf/compress.exp
> +++ b/ld/testsuite/ld-elf/compress.exp
> @@ -171,7 +171,7 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then {
> set test_name "Link with zlib compressed debug output"
> set test normal
> send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n"
> -set got [remote_exec host "$READELF -w tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"]
> +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"]
Why do you need sh -c?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list