ARMmbed / ble-nrf51822

Nordic stack and drivers for the mbed BLE_API
Other
46 stars 51 forks source link

Fixed size attribute should not accept write requests with a value of a different size. #125

Open pan- opened 8 years ago

pan- commented 8 years ago

When an attribute is instantiated with a fixed size, it is expected that a write operation on this attribute will only be accepted if the size of the data written is equal to the size of the attribute.

It is not the case, either on client side or on server side, writing an attribute with a value shorter than the attribute size will succeed.

For instance, if an attribute have a fixed size of 4 byte an attribute value is equal to 0xAA 0xAA 0xAA 0xAA then writing this attribute with the value 0x01 0x02 will succeed and the new attribute value will be: 0x01 0x02 0xAA 0xAA.

Reproducible by running:

ciarmcom commented 8 years ago

ARM Internal Ref: IOTSFW-2377