From a494171a5a2778fc7b4d24d673d950f3e9864063 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 16 Jun 2013 10:39:02 -0400 Subject: fix invalid access in aio notification 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/aio/aio_readwrite.c b/src/aio/aio_readwrite.c index e4c95aa2..666372db 100644 --- 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; -- cgit v1.2.3-70-g09d2