diff options
author | Ajay Dudani <adudani@quicinc.com> | 2009-10-12 00:53:07 -0700 |
---|---|---|
committer | Amar Singhal <c_amars@quicinc.com> | 2009-10-13 15:07:08 -0700 |
commit | 8bcb1a3b9f69df4a0b4350ccc94bed947d7e9fea (patch) | |
tree | 65fe2f95847cc1ea3b53a430200966fb997e1ff5 | |
parent | dce33c3a81a3e06072c6b5b855ee06d43fc272db (diff) | |
download | bionic-M76XXTSNCJNLYA47354004.zip bionic-M76XXTSNCJNLYA47354004.tar.gz bionic-M76XXTSNCJNLYA47354004.tar.bz2 |
bionic: Add null check before dereferencing thread data structureQ8650BSDCANLYA324028Q8650BSDCANLYA324026Q8650BSDCANLYA32402404Q8650BSDCANLYA32402403Q8650BSDCANLYA324024Q8650BSDCANLYA324022Q8650BSDCANLYA324020Q8650BSDCANLYA32401805Q8650BSDCANLYA32401804Q8650BSDCANLYA32401803Q8650BSDCANLYA32401802Q8650BSDCANLYA32401801Q8650BSDCANLYA324018Q8650BSDCANLYA324016Q8650BSDCANLYA324014Q8650BSDCANLYA324012Q8650BSDCANLYA3240Q8650BSDCANLYA3230Q8650BSDCANLYA3220Q8650BSDCANLYA3210M76XXTSNCJNLYA47358005M76XXTSNCJNLYA47358003M76XXTSNCJNLYA47358002M76XXTSNCJNLYA47354021M76XXTSNCJNLYA47354020M76XXTSNCJNLYA47354019M76XXTSNCJNLYA47354018M76XXTSNCJNLYA47354017M76XXTSNCJNLYA47354016M76XXTSNCJNLYA47354015M76XXTSNCJNLYA47354014M76XXTSNCJNLYA47354013M76XXTSNCJNLYA47354012M76XXTSNCJNLYA47354011M76XXTSNCJNLYA47354010M76XXTSNCJNLYA47354009M76XXTSNCJNLYA47354008M76XXTSNCJNLYA47354007M76XXTSNCJNLYA47354006M76XXTSNCJNLYA47354005M76XXTSNCJNLYA47354004M76XXTSNCJNLYA47354003M76XXTSNCJNLYA47354002M76XXTSNCJNLYA47354001M76XXTSNCJNLYA4735M76XXTSNCJNLYA47253001M76XXTSNCJNLYA47252013M76XXTSNCJNLYA47252012M76XXTSNCJNLYA47252011M76XXTSNCJNLYA47252010M76XXTSNCJNLYA47252009M76XXTSNCJNLYA47252005M76XXTSNCJNLYA47252004M76XXTSNCJNLYA47252003M76XXTSNCJNLYA47252002M76XXTSNCJNLYA4725M76XXTSNCJNLYA4715
While this is not a fix for the CR, this may prevent native crash
as seen in CR 212158
-rw-r--r-- | libc/bionic/pthread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/bionic/pthread.c b/libc/bionic/pthread.c index ec3c459..f2d9cb3 100644 --- a/libc/bionic/pthread.c +++ b/libc/bionic/pthread.c @@ -1538,7 +1538,11 @@ int pthread_kill(pthread_t tid, int sig) int old_errno = errno; pthread_internal_t * thread = (pthread_internal_t *)tid; + if (!thread) + return ESRCH; + ret = tkill(thread->kernel_id, sig); + if (ret < 0) { ret = errno; errno = old_errno; |