Bug 1176099 - Fix missing NULL check r=luke
authorJulian Hector <julian.r.hector@gmail.com>
Thu, 28 Apr 2016 20:41:14 +0200
changeset 357649 723d1f49780a66d4f6368367589ca233272aeef6
parent 357648 0942b9f7878c4ea8ca0e58b6e8c44b91cb78d6b2
child 357650 b083e01f57a13f614bb2de9b0413409905f59385
push id16816
push userbmo:gasolin@mozilla.com
push dateFri, 29 Apr 2016 03:33:20 +0000
reviewersluke
bugs1176099
milestone49.0a1
Bug 1176099 - Fix missing NULL check r=luke MozReview-Commit-ID: ICNQNqJZzA8
security/sandbox/linux/SandboxHooks.cpp
--- a/security/sandbox/linux/SandboxHooks.cpp
+++ b/security/sandbox/linux/SandboxHooks.cpp
@@ -26,17 +26,17 @@ static int HandleSigset(int (*aRealFunc)
       errno = ENOSYS;
       return -1;
     }
 
     return ENOSYS;
   }
 
   // Avoid unnecessary work
-  if (aHow == SIG_UNBLOCK || !sigismember(aSet, SIGSYS))
+  if (aSet == NULL || aHow == SIG_UNBLOCK || !sigismember(aSet, SIGSYS))
     return aRealFunc(aHow, aSet, aOldSet);
 
   sigset_t newSet = *aSet;
   if (sigdelset(&newSet, SIGSYS) != 0) {
     if (aUseErrno) {
       errno = ENOSYS;
       return -1;
     }