If the buffer is too short, it is still totally legal to call all of the
later cbor statements, so I'm not sure how that happened. All that
should happen after the first time is that would be the increment of the
'size needed'.
The tinycbor library is really good about not writing past the buffer
Playing with the code, I ran across a situation where the cbor reported an
error (because the buffer was too short), and I got a SIGSEGV in a later cbor
statement because nobody had tested 'err' yet. Since the buffers are allocated
rationally, this is unlikely to happen in practice. Still...
Yep, thanks Thiago. That is the situation where we use err = err | vs
err = err ||, since that is the only error code we are capable of
recovering from.
On Fri, 2015-10-23 at 10:47 -0700, Thiago Macieira wrote:
> On Friday 23 October 2015 17:41:12 Keane, Erich wrote:
> > The err = err | is only
I'm not terribly involved anymore, but since I ended up writing most of
that, I'll respond. I will say that it is based on the examples from
the tinycbor library, I'm not sure how I would have done it otherwise.
The err = err | is only used in a few places where
knowing the error afterwards is i
https://www.iotivity.org/documentation/features lists 0.9.0 features.
Best,
Tim Kourt
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151023/9326d901/attachment.html>
I think this illustrates the basic principal we should be following in
regards to encapsulation/modularity.
That is, says "oh, we can use library X without checking things because
it has promised to behave" is not safe coding. The app needs to code a
bit defensively. Among other things we might as
econsidered.
John Light
Intel OTC OIC Development
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151023/027c9076/attachment.html>
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151023/d8427318/attachment.html>
On Friday 23 October 2015 10:58:04 Keane, Erich wrote:
> The tinycbor library is really good about not writing past the buffer,
> unless you lie to it about how much was allocated. I'm sure Thiago
> would be really interested to see a situation where this isn't the case.
I am. The backtrace is us
On Friday 23 October 2015 16:52:16 Kourt, Tim A wrote:
> https://www.iotivity.org/documentation/features lists 0.9.0 features.
Updated with some information from
https://wiki.iotivity.org/release_note_1.0.0
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open So
On Friday 23 October 2015 17:41:12 Keane, Erich wrote:
> The err = err | is only used in a few places where
> knowing the error afterwards is important, for most situations, the
> error code is pretty meaningless since there is nothing we can do about
> it.
To be clear: there's only one error cod
oftware Developer
Sungkyunkwan Univ. Computer Engineering 08
B.E.S.T. House Team & Side Of House
Jake Kim
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151023/6754d9ee/attachmen
le if
this message was modified, changed or falsified.
Thank you.
-- next part --
HTML ?? ??...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151023/d6388eb7/attachment.html>
-- next part --
A non-text atta
ivity-dev/attachments/20151023/454dc080/attachment.html>
14 matches
Mail list logo