]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix crash in go_symbol_package_name
authorTom Tromey <tom@tromey.com>
Fri, 17 Feb 2023 00:52:07 +0000 (17:52 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 18 Feb 2023 00:05:04 +0000 (19:05 -0500)
commite8eca7a6b602290bb3f50728432d524577ade727
tree690c77570707426db4dd123ca09d645bca0c0f3f
parentbe643e074f3081b537a11c87c1ccf1d400f2945e
Fix crash in go_symbol_package_name

go_symbol_package_name package name asserts that it is only passed a
Go symbol, but this is not enforced by one caller.  It seems simplest
to just check and return early in this case.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17876
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
gdb/go-lang.c
gdb/go-lang.h
gdb/testsuite/gdb.go/no-package.exp [new file with mode: 0644]