]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
fix division by zero in target_read_string()
authorKilian Kilger <kkilger@gmail.com>
Sun, 26 May 2024 08:41:12 +0000 (10:41 +0200)
committerTom Tromey <tromey@adacore.com>
Wed, 12 Jun 2024 14:18:47 +0000 (08:18 -0600)
commit4239c6015a9353bd75f6c61709935312312ec605
treeec874a0bc4d0936cc9e7ebe203547fd8287069cb
parentf41400ee71f8cfa40b4fb784cbba231394b9c698
fix division by zero in target_read_string()

Under certain circumstances, a floating point exception in
target_read_string() can happen when the type has been obtained
by a call to stpy_lazy_string_elt_type(). In the latter function,
a call to check_typedef() has been forgotten. This makes
type->length = 0 in this case.

(cherry picked from commit 8130c1a430c952f65b621aee2c801316a61fab14)
gdb/python/py-lazy-string.c