diff options
author | Jiong Wang <jiong.wang@arm.com> | 2017-02-02 17:15:26 +0000 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2017-02-06 15:25:18 +0000 |
commit | 65f90e82590c34d4211ca3c984ef8caaf1808819 (patch) | |
tree | 8059addf933b0b8db99b1c2a4dafc98e4c53d7dd /ld/testsuite/ld-elf | |
parent | 6ec7c1ae19e9e1bf2edad5125941a2fd5fdfde0b (diff) | |
download | gdb-65f90e82590c34d4211ca3c984ef8caaf1808819.zip gdb-65f90e82590c34d4211ca3c984ef8caaf1808819.tar.gz gdb-65f90e82590c34d4211ca3c984ef8caaf1808819.tar.bz2 |
[ld, testsuite] Don't print to stdout for "readelf -w" to avoid buffer overflow
ld/
* testsuite/ld-elf/compress.exp: Don't print to stdout for all
"readelf -w".
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/compress.exp | 8 |
1 files changed, 4 insertions, 4 deletions
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"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -180,7 +180,7 @@ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { set test_name "Link with zlib compressed debug output" set test zlibnormal send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\"" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -206,7 +206,7 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { set test_name "Link with zlib-gnu compressed debug output" set test gnunormal send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\"" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -232,7 +232,7 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { set test gabinormal set test_name "Link with zlib-gabi compressed debug output" 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"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" |