ble-nrf51822 icon indicating copy to clipboard operation
ble-nrf51822 copied to clipboard

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

Open pan- opened this issue 8 years ago • 1 comments

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:

  • DescriptorReadWrite_test_12
  • DescriptorReadWrite_test_13
  • CharacteristicReadWrite_test_11
  • CharacteristicReadWrite_test_12

pan- avatar Mar 18 '16 16:03 pan-

ARM Internal Ref: IOTSFW-2377

ciarmcom avatar Mar 18 '16 16:03 ciarmcom