DragonFlyBSD Kernel Audit
DF-1281 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/disk/mpt/mpt.c b/sys/dev/disk/mpt/mpt.c
--- a/sys/dev/disk/mpt/mpt.c
+++ b/sys/dev/disk/mpt/mpt.c
@@ -557,6 +557,8 @@
 		handled = 0;
 		msg = (MSG_EVENT_NOTIFY_REPLY *)reply_frame;
 		msg->EventDataLength = le16toh(msg->EventDataLength);
+		if (msg->EventDataLength > 32)
+			msg->EventDataLength = 32;
 		msg->IOCStatus = le16toh(msg->IOCStatus);
 		msg->IOCLogInfo = le32toh(msg->IOCLogInfo);
 		msg->Event = le32toh(msg->Event);