]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
testsuite, mi: prevent buffer overflow in get_mi_thread_list
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tue, 18 Feb 2025 08:13:43 +0000 (09:13 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tue, 18 Feb 2025 08:13:43 +0000 (09:13 +0100)
commit2b020f53230f57f4f44029aceee95ca484485235
treecbcba21f77b6543c747c0e94187dbab85532488a
parentec51c7ce9fb0a8c4b891cc67658c225be23e6820
testsuite, mi: prevent buffer overflow in get_mi_thread_list

If there is a large number of threads in the input program, the expect
buffer in `get_mi_thread_list` would become full.  Prevent this by
consuming the buffer in small pieces.

Regression-tested using the gdb.mi tests.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/testsuite/lib/mi-support.exp