From: Julian Seward Date: Wed, 4 May 2011 09:03:41 +0000 (+0000) Subject: handle_maybe_load_notifier: assert when symbol == NULL rather than X-Git-Tag: svn/VALGRIND_3_7_0~515 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31f76b8fc4c9aee6faa3a7ae1ea31a013b7cd46;p=thirdparty%2Fvalgrind.git 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 --- 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 */