From: Bart Van Assche Date: Tue, 29 Jun 2010 06:16:52 +0000 (+0000) Subject: Fix for bug #242814 (Linux): made sure that Valgrind tools do not crash when the... X-Git-Tag: svn/VALGRIND_3_6_0~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db21fdc0d47594f51b0fcb1031b7e8e16f497fd;p=thirdparty%2Fvalgrind.git Fix for bug #242814 (Linux): made sure that Valgrind tools do not crash when the first argument of the mount() system call is NULL. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11191 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 9c47dfb2b2..247402d807 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -420,7 +420,8 @@ PRE(sys_mount) PRE_REG_READ5(long, "mount", char *, source, char *, target, char *, type, unsigned long, flags, void *, data); - PRE_MEM_RASCIIZ( "mount(source)", ARG1); + if (ARG1) + PRE_MEM_RASCIIZ( "mount(source)", ARG1); PRE_MEM_RASCIIZ( "mount(target)", ARG2); PRE_MEM_RASCIIZ( "mount(type)", ARG3); }