OSDN Git Service

use qt_safe_read() in QEventDispatcherUNIXPrivate::processThreadWakeUp()
authorIvailo Monev <xakepa10@gmail.com>
Mon, 15 Feb 2021 00:09:50 +0000 (02:09 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 15 Feb 2021 00:09:50 +0000 (02:09 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/kernel/qeventdispatcher_unix.cpp

index f373842..d2b1d8f 100644 (file)
@@ -171,7 +171,7 @@ int QEventDispatcherUNIXPrivate::processThreadWakeUp(int nsel)
         // some other thread woke us up... consume the data on the thread pipe so that
         // select doesn't immediately return next time
         char c[16];
-        while (QT_READ(thread_pipe[0], c, sizeof(c)) > 0)
+        while (qt_safe_read(thread_pipe[0], c, sizeof(c)) > 0)
             ;
 
         if (!wakeUps.testAndSetRelease(1, 0)) {