]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(pthread_join): Limited checking for invalid descriptors.
authorUlrich Drepper <drepper@redhat.com>
Fri, 21 Feb 2003 08:34:16 +0000 (08:34 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 21 Feb 2003 08:34:16 +0000 (08:34 +0000)
nptl/pthread_join.c

index 387f230576ea2215385ecfe23b3660a3d551c553..84f993c70012d0f60b2b93969fd79d9c3ef9cfce 100644 (file)
@@ -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;