public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Witowski <jakub.witowski@silvair.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC BlueZ 0/1] Validate element indexation
Date: Mon,  8 Jul 2019 16:13:13 +0200	[thread overview]
Message-ID: <20190708141314.13950-1-jakub.witowski@silvair.com> (raw)

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


             reply	other threads:[~2019-07-08 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 14:13 Jakub Witowski [this message]
2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: Validate element indexation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708141314.13950-1-jakub.witowski@silvair.com \
    --to=jakub.witowski@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox