Diff between 890149c1fb56e36aae22918f2a68656a978fc2fd and 709aa00a1e502c434045f1fa2800391699ca0658

Changed Files

File Additions Deletions Status
emulator/btdev.c +6 -0 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 7e4cb93..a1c82ae 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5728,6 +5728,12 @@ static int cmd_pa_create_sync(struct btdev *dev, const void *data, uint8_t len)
 	uint8_t status = BT_HCI_ERR_SUCCESS;
 	struct le_per_adv *per_adv;
 
+	if (cmd->sid > 0x0f) {
+		cmd_status(dev, BT_HCI_ERR_INVALID_PARAMETERS,
+			   BT_HCI_CMD_LE_PA_CREATE_SYNC);
+		return 0;
+	}
+
 	/* Create new train */
 	per_adv = le_per_adv_new(dev, cmd->addr_type, cmd->addr);
 	if (!per_adv)