]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't try and return the old mask from sigprocmask if the user gave
authorTom Hughes <tom@compton.nu>
Tue, 16 Nov 2004 12:08:45 +0000 (12:08 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 16 Nov 2004 12:08:45 +0000 (12:08 +0000)
a null pointer for that argument.

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

coregrind/vg_syscalls.c

index b9d88febab55765edde48fdb9a6f760b1a7f97ae..15f4307046581e80395b0a82d01f18d7db0f36e9 100644 (file)
@@ -5944,7 +5944,8 @@ PREx(sys_sigprocmask, SIG_SIM)
                                &bigger_set,
                                &bigger_oldset );
 
-      *oldset = bigger_oldset.sig[0];
+      if (oldset)
+        *oldset = bigger_oldset.sig[0];
    }
 }