* winsup.h (SIGTOMASK): Add cast to sigset_t to avoid int overflow.

This commit is contained in:
Corinna Vinschen 2015-02-23 12:40:01 +00:00
parent d6f62a1178
commit f6ec73c018
3 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2015-02-23 Corinna Vinschen <corinna@vinschen.de>
* winsup.h (SIGTOMASK): Add cast to sigset_t to avoid int overflow.
2015-02-20 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (internal_getgroups): Take additional timeout_ns parameter.

View File

@ -35,3 +35,6 @@ Bug Fixes
- 64 bit: Export forgotten symbol __mempcpy.
Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00394.html
- 64 bit: Avoid misbehaviour in signal mask computation.
Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00665.html

View File

@ -131,7 +131,7 @@ extern int cygserver_running;
})
/* Convert a signal to a signal mask */
#define SIGTOMASK(sig) (1 << ((sig) - 1))
#define SIGTOMASK(sig) ((sigset_t) 1 << ((sig) - 1))
#define set_api_fatal_return(n) do {extern int __api_fatal_exit_val; __api_fatal_exit_val = (n);} while (0)