Diff between f68124f1ee90eea3ffbe7541a917f449fcea6029 and 6d8d1a59bc2b3012216c53624d1689822b4f21e1

Changed Files

File Additions Deletions Status
profiles/alert/server.c +3 -0 modified

Full Patch

diff --git a/profiles/alert/server.c b/profiles/alert/server.c
index 58c8b03..8da1928 100644
--- a/profiles/alert/server.c
+++ b/profiles/alert/server.c
@@ -854,6 +854,9 @@ static uint8_t alert_notif_cp_write(struct attribute *a,
 {
 	DBG("a = %p", a);
 
+	if (a->len < 2)
+		return 0;
+
 	switch (a->data[0]) {
 	case ENABLE_NEW_INCOMING:
 		DBG("ENABLE_NEW_INCOMING: 0x%02x", a->data[1]);