From 70ce6a9ade79bd43b0cccab87da21e2f00979d28 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 2 Aug 2008 23:56:26 +0000 Subject: [PATCH] Don't allow the kernel team to be passed to elf_debug_lookup_user_symbol_address(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26747 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/elf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/elf.cpp b/src/system/kernel/elf.cpp index 19bd212959..9fb5e435f0 100644 --- a/src/system/kernel/elf.cpp +++ b/src/system/kernel/elf.cpp @@ -1310,13 +1310,16 @@ symbol_found: /*! Tries to find a matching user symbol for the given address. - Note that the given team's address must already be in effect. + Note that the given team's address space must already be in effect. */ status_t elf_debug_lookup_user_symbol_address(struct team* team, addr_t address, addr_t *_baseAddress, const char **_symbolName, const char **_imageName, bool *_exactMatch) { + if (team == NULL || team == team_get_kernel_team()) + return B_BAD_VALUE; + UserSymbolLookup& lookup = UserSymbolLookup::Default(); status_t error = lookup.Init(team); if (error != B_OK)