]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
handle_maybe_load_notifier: assert when symbol == NULL rather than
authorJulian Seward <jseward@acm.org>
Wed, 4 May 2011 09:03:41 +0000 (09:03 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 4 May 2011 09:03:41 +0000 (09:03 +0000)
segfaulting.  Potential segfault was found by IBM's BEAM checker.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11722

coregrind/m_redir.c

index b45b03ece0076a7ba9f09e83f98755c8a12f90bc..76186908c91f52200c680960fc44af1a2ec5e11d 100644 (file)
@@ -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 */