Merge "[WPA3] Added setGroupMgmtCipher and getGroupMgmtCipher for Suite-B"
diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
index 710fe50..7b43c7d 100644
--- a/src/ap/wnm_ap.c
+++ b/src/ap/wnm_ap.c
@@ -209,6 +209,13 @@
 		return;
 	}
 
+	if (len < 1) {
+		wpa_printf(MSG_DEBUG,
+			   "WNM: Ignore too short WNM-Sleep Mode Request from "
+			   MACSTR, MAC2STR(addr));
+		return;
+	}
+
 	dialog_token = *pos++;
 	while (pos + 1 < frm + len) {
 		u8 ie_len = pos[1];