From: Rich Felker Date: Sun, 16 Jun 2013 14:39:02 +0000 (-0400) Subject: fix invalid access in aio notification X-Git-Tag: v0.9.11~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a494171a5a2778fc7b4d24d673d950f3e9864063;p=oweals%2Fmusl.git 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. --- 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;