public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC BlueZ 0/1] Validate element indexation
@ 2019-07-08 14:13 Jakub Witowski
  2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: " Jakub Witowski
  2019-07-08 16:53 ` [RFC BlueZ 0/1] " Stotland, Inga
  0 siblings, 2 replies; 5+ messages in thread
From: Jakub Witowski @ 2019-07-08 14:13 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

I've prepared validation of element indexation.

First of all I've used 64-bit unsigned value to collect all given indexes.
As You can deduce from "4.2.1.1 Composition Data Page 0", the maximum value of elements can be 61.
It is limited by max message size which is 376. Furthermore the element indexes should be given
with no gap between them, for example:
  element index: 3, 2, 0, 1 will be ok,
  element index: 3, 2, 0 should return an error because the idx 1 is missing

Secondly I think, that the validation of element index value may be required, cause for now
we support 255 (uint8_t).

Please let me know what do You thing of aboves.

BR,
Jakub Witowski 

Jakub Witowski (1):
  mesh: Validate element indexation

 mesh/node.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-09  6:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08 14:13 [RFC BlueZ 0/1] Validate element indexation Jakub Witowski
2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: " Jakub Witowski
2019-07-08 16:53 ` [RFC BlueZ 0/1] " Stotland, Inga
2019-07-08 18:22   ` Michał Lowas-Rzechonek
2019-07-09  6:36     ` Stotland, Inga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox