Browse Source

enforce stack size min in pthread_attr_setstacksize

Rich Felker 14 years ago
parent
commit
8c967b9386
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/thread/pthread_attr_setstacksize.c

+ 1 - 1
src/thread/pthread_attr_setstacksize.c

@@ -2,7 +2,7 @@
 
 int pthread_attr_setstacksize(pthread_attr_t *a, size_t size)
 {
-	if (size-PAGE_SIZE > SIZE_MAX/4) return EINVAL;
+	if (size-PTHREAD_STACK_MIN > SIZE_MAX/4) return EINVAL;
 	a->_a_stacksize = size - DEFAULT_STACK_SIZE;
 	return 0;
 }