浏览代码

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.
Rich Felker 11 年之前
父节点
当前提交
a494171a5a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/aio/aio_readwrite.c

+ 1 - 1
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;