samples: Bluetooth: Fix TMAP peripheral off-by-one URI schemes
i has to be less than the size of the array, as we use i as the index. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
969d279190
commit
ca1fd03520
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ static void read_uri_schemes_string_cb(struct bt_conn *conn, int err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > sizeof(remote_uri)) {
|
if (i >= sizeof(remote_uri)) {
|
||||||
printk("Cannot store URI of length %zu: %s\n", i, value);
|
printk("Cannot store URI of length %zu: %s\n", i, value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue