]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdbserver: check for nullptr condition in regcache::get_register_status
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tue, 17 Dec 2024 07:48:03 +0000 (08:48 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tue, 17 Dec 2024 07:48:03 +0000 (08:48 +0100)
commit81b65d86956f1f47cf7d45cd58d9ca849fe8ffc6
tree943f5fda9c048cefa7a30f781471ed74c66cf56b
parentccdddcac51d41d4c2adaf79d5db4d0eefa5a682b
gdbserver: check for nullptr condition in regcache::get_register_status

A regcache can be initialized with a register value buffer, in which
case, the register_status pointer is null.  This condition is checked
in set_register_status, but not in get_register_status.  Do this check
for consistence and safety.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdbserver/regcache.cc