summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ace/OS_NS_Thread.inl11
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c54e7992a88..eede59515f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri May 27 08:49:12 UTC 2005 Martin Corino <mcorino@remedy.nl>
+
+ * ace/OS_NS_Thread.inl:
+
+ Fixed possible NULL-pointer assignment for VxWorks implementation
+ of ACE_OS::thr_sigsetmask().
+
Fri May 27 00:40:19 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
* bin/tao_orb_tests.lst:
diff --git a/ace/OS_NS_Thread.inl b/ace/OS_NS_Thread.inl
index 9374617f92a..ac084d571e2 100644
--- a/ace/OS_NS_Thread.inl
+++ b/ace/OS_NS_Thread.inl
@@ -4218,20 +4218,25 @@ ACE_OS::thr_sigsetmask (int how,
ACE_NOTSUP_RETURN (-1);
# elif defined (VXWORKS)
+ int old_mask = 0;
switch (how)
{
case SIG_BLOCK:
case SIG_UNBLOCK:
{
// get the old mask
- *osm = ::sigsetmask (*nsm);
+ old_mask = ::sigsetmask (*nsm);
// create a new mask: the following assumes that sigset_t is 4 bytes,
// which it is on VxWorks 5.2, so bit operations are done simply . . .
- ::sigsetmask (how == SIG_BLOCK ? (*osm |= *nsm) : (*osm &= ~*nsm));
+ ::sigsetmask (how == SIG_BLOCK ? (old_mask |= *nsm) : (old_mask &= ~*nsm));
+ if (osm)
+ *osm = old_mask;
break;
}
case SIG_SETMASK:
- *osm = ::sigsetmask (*nsm);
+ old_mask = ::sigsetmask (*nsm);
+ if (osm)
+ *osm = old_mask;
break;
default:
return -1;