DragonFlyBSD Kernel Audit
DF-1135 / fix.diff
← back to finding ↓ download raw
--- /tmp/orig/dev/sound/pci/hda/hdaa.c	2026-07-23 11:54:56.794821000 +0000
+++ dev/sound/pci/hda/hdaa.c	2026-07-23 11:57:17.676284000 +0000
@@ -649,6 +649,8 @@
 	if ((w->eld[0] >> 3) != 0x02)
 		return;
 	len = min(w->eld_len, (u_int)w->eld[2] * 4);
+	if (len < 6)
+		return;
 	mnl = w->eld[4] & 0x1f;
 	device_printf(dev,
 	    "ELD nid=%d: CEA_EDID_Ver=%u MNL=%u\n",