From a31f76b8fc4c9aee6faa3a7ae1ea31a013b7cd46 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 4 May 2011 09:03:41 +0000 Subject: [PATCH] handle_maybe_load_notifier: assert when symbol == NULL rather than segfaulting. Potential segfault was found by IBM's BEAM checker. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11722 --- coregrind/m_redir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index b45b03ece0..76186908c9 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -1187,6 +1187,7 @@ void handle_maybe_load_notifier( const UChar* soname, /* Normal load-notifier handling after here. First, ignore all symbols lacking the right prefix. */ + vg_assert(symbol); // assert rather than segfault if it is NULL if (0 != VG_(strncmp)(symbol, VG_NOTIFY_ON_LOAD_PREFIX, VG_NOTIFY_ON_LOAD_PREFIX_LEN)) /* Doesn't have the right prefix */ -- 2.47.2