about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-07-11 11:48:08 -0400
committerRich Felker <dalias@aerifal.cx>2019-07-13 11:22:37 -0400
commit7829f42a2c8944555439380498ab8b924d0f2070 (patch)
tree36c52273b5a6baedec042b64986a542ab004fdc2
parentc225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f (diff)
downloadmusl-7829f42a2c8944555439380498ab8b924d0f2070.tar.gz
musl-7829f42a2c8944555439380498ab8b924d0f2070.tar.xz
musl-7829f42a2c8944555439380498ab8b924d0f2070.zip
fix sigaltstack to ignore ss_size with SS_DISABLE, per POSIX
-rw-r--r--src/signal/sigaltstack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal/sigaltstack.c b/src/signal/sigaltstack.c
index cfa3f5c1..d3a6e821 100644
--- a/src/signal/sigaltstack.c
+++ b/src/signal/sigaltstack.c
@@ -5,7 +5,7 @@
 int sigaltstack(const stack_t *restrict ss, stack_t *restrict old)
 {
 	if (ss) {
-		if (ss->ss_size < MINSIGSTKSZ) {
+		if (!(ss->ss_flags & SS_DISABLE) && ss->ss_size < MINSIGSTKSZ) {
 			errno = ENOMEM;
 			return -1;
 		}