mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-13 09:01:51 +03:00
(pthread_join): Limited checking for invalid descriptors.
This commit is contained in:
@ -40,7 +40,7 @@ pthread_join (threadid, thread_return)
|
||||
struct pthread *pd = (struct pthread *) threadid;
|
||||
|
||||
/* Make sure the descriptor is valid. */
|
||||
if (DEBUGGING_P && __find_in_stack_list (pd) == NULL)
|
||||
if ((DEBUGGING_P && __find_in_stack_list (pd) == NULL) || pd->tid <= 0)
|
||||
/* Not a valid thread handle. */
|
||||
return ESRCH;
|
||||
|
||||
|
Reference in New Issue
Block a user