librt -- aio: lio_listio: Do not dereference NULL sigevp.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Wed, 26 Oct 2011 12:35:59 +0000 (05:35 -0700)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Wed, 26 Oct 2011 12:35:59 +0000 (05:35 -0700)
Reported-by: Z`
lib/librt/aio.c

index 8c1d19b..3823714 100644 (file)
@@ -157,7 +157,8 @@ lio_listio(int mode, struct aiocb *const apv[], int nent,
        int i;
 
 #ifndef notyet
-       if ((sigevp->sigev_notify != SIGEV_NONE) &&
+       if (sigevp &&
+           (sigevp->sigev_notify != SIGEV_NONE) &&
            (sigevp->sigev_notify != SIGEV_THREAD))
                return (ENOSYS);
 #endif