]> git.saurik.com Git - apple/security.git/blobdiff - securityd/src/notifications.cpp
Security-57337.20.44.tar.gz
[apple/security.git] / securityd / src / notifications.cpp
index 0a82c885240b01d43f1b94199ff393565261cfb1..098b4760724f63abe7dd29b606c13926d615abe5 100644 (file)
@@ -194,8 +194,11 @@ void SharedMemoryListener::notifyMe(Notification* notification)
 {
        const void* data = notification->data.data();
        UInt32 length = notification->data.length();
-       WriteMessage (notification->domain, notification->event, data, length);
-       
+    /* enforce a maximum size of 16k for notifications */
+    if (length > 16384) return;
+
+    WriteMessage (notification->domain, notification->event, data, length);
+
        if (!mActive)
        {
                Server::active().setTimer (this, Time::Interval(kServerWait));