File CVE-2019-10163.patch of Package pdns.openSUSE_Backports_SLE-15-SP1_Update

diff --git pdns-4.1.8/pdns/communicator.cc pdns-4.1.8-busyloop/pdns/communicator.cc
index 7db5a3e..7fd59e4 100644
--- pdns-4.1.8/pdns/communicator.cc
+++ pdns-4.1.8-busyloop/pdns/communicator.cc
@@ -136,7 +136,10 @@ void CommunicatorClass::mainloop(void)
           if (extraSlaveRefresh)
             slaveRefresh(&P);
         }
-        else { 
+        else {
+          // eat up extra posts to avoid busy looping if many posts were done
+          while (d_any_sem.tryWait() == 0) {
+          }
           break; // something happened
         }
         // this gets executed at least once every second
openSUSE Build Service is sponsored by