* Ensures an IPC message isn't too big. * return value: false if checks failed, true otherwise. */
| 254 | * return value: false if checks failed, true otherwise. |
| 255 | */ |
| 256 | static inline bool SafetyChecks(u32 command_len, int command_size, u32 reply_len, int reply_size = 0, u32 buf_size = MAX_IPC_SIZE - 1) |
| 257 | { |
| 258 | return !((command_len + command_size) > buf_size || |
| 259 | (reply_len + reply_size) >= MAX_IPC_RETURN_SIZE); |
| 260 | } |
| 261 | } // namespace PINEServer |
| 262 | |
| 263 | bool PINEServer::Initialize(int slot) |