OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe80a8e
)
fix invalid pointer in synccall (multithread setuid, etc.)
author
Rich Felker
<dalias@aerifal.cx>
Mon, 2 Sep 2013 19:06:46 +0000
(15:06 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 2 Sep 2013 19:06:46 +0000
(15:06 -0400)
the head pointer was not being reset between calls to synccall, so any
use of this interface more than once would build the linked list
incorrectly, keeping the (now invalid) list nodes from the previous
call.
src/thread/synccall.c
patch
|
blob
|
history
diff --git
a/src/thread/synccall.c
b/src/thread/synccall.c
index
706c8e7
..
c54570b
100644
(file)
--- a/
src/thread/synccall.c
+++ b/
src/thread/synccall.c
@@
-58,6
+58,7
@@
void __synccall(void (*func)(void *), void *ctx)
sem_init(&chaindone, 0, 0);
sem_init(&chainlock, 0, 1);
chainlen = 0;
+ head = 0;
callback = func;
context = ctx;