X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb..822b670c6f91d089ccb51b77e24b6ac80406b337:/securityd/src/notifications.cpp?ds=sidebyside diff --git a/securityd/src/notifications.cpp b/securityd/src/notifications.cpp index 0a82c885..098b4760 100644 --- a/securityd/src/notifications.cpp +++ b/securityd/src/notifications.cpp @@ -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));