projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8600849
)
fix invalid access in aio notification
author
Rich Felker
<dalias@aerifal.cx>
Sun, 16 Jun 2013 14:39:02 +0000
(10:39 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sun, 16 Jun 2013 14:39:02 +0000
(10:39 -0400)
issue found and patch provided by Jens Gustedt. after the atomic store
to the error code field of the aiocb, the application is permitted to
free or reuse the storage, so further access is invalid. instead, use
the local copy that was already made.
src/aio/aio_readwrite.c
patch
|
blob
|
history
diff --git
a/src/aio/aio_readwrite.c
b/src/aio/aio_readwrite.c
index e4c95aa2382405eadabdc61582d40bfbb6dd9eb8..666372db7b7da3c40ca3f46c955c9e10c1637ac6 100644
(file)
--- a/
src/aio/aio_readwrite.c
+++ b/
src/aio/aio_readwrite.c
@@
-51,7
+51,7
@@
static void *io_thread(void *p)
__aio_wake();
- switch (
cb->aio_sigevent
.sigev_notify) {
+ switch (
sev
.sigev_notify) {
case SIGEV_SIGNAL:
notify_signal(&sev);
break;