Fix issues dealing with OOM checking in CBOR 03/24003/3
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 26 Jan 2018 07:44:37 +0000 (23:44 -0800)
committerPhil Coval <philippe.coval@osg.samsung.com>
Tue, 6 Feb 2018 11:34:29 +0000 (11:34 +0000)
commit3a406cd301fe24c568f1538eb6d5bf9e20992120
tree39b61687bbfae6452468738c335d5925b364b7ac
parenta85e1e8d74d04b3bd44e87cd984925e497cd7f34
Fix issues dealing with OOM checking in CBOR

Since we're doing err |=, the correct way to check for OOM is with &.

TinyCBOR 0.5 is capable of reporting if you added too many or too few
elements to a container. So don't skip adding one: always add them all,
so we can get the actual size you need.

Change-Id: I56b444f9d6274221a3b7fffd150d4c8e2cb6618a
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/src/ocpayloadconvert.c