Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: services/URIBeacon2Service.h
- Revision:
- 194:669eced4cd5e
- Parent:
- 193:ac2feceb7e87
- Child:
- 196:febbd68b1095
diff -r ac2feceb7e87 -r 669eced4cd5e services/URIBeacon2Service.h
--- a/services/URIBeacon2Service.h Fri Nov 28 14:11:24 2014 +0000
+++ b/services/URIBeacon2Service.h Fri Nov 28 14:11:25 2014 +0000
@@ -84,10 +84,10 @@
resetChar(resetCharUUID, reinterpret_cast<uint8_t *>(&resetFlag), 1, 1,
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE)
{
- if ((uriDataIn == NULL) || ((uriDataLength = strlen(uriDataIn)) == 0)) {
+ if ((uriDataIn == NULL) || ((uriDataLength = strlen(uriDataIn)) == 0) || (uriDataLength > MAX_SIZE_URI_DATA_CHAR_VALUE)) {
return;
}
- strncpy(reinterpret_cast<char *>(uriData), uriDataIn, MAX_SIZE_URI_DATA_CHAR_VALUE);
+ strcpy(reinterpret_cast<char *>(uriData), uriDataIn);
configure();
if (initSucceeded) {
