该项目从 https://github.com/intel/tinycbor 镜像。
拉取镜像更新于 。
- 5月 12, 2015
-
-
由 Thiago Macieira 创作于
It's very easy for a short packet to contain a very high number of nested arrays (a packet with N bytes can be N-1 nested arrays), which could cause stack overflow problems in devices using cbor_value_map_find_value, so ensure that we won't crash. The actual value needs to be chosen by the implementor depending on the stack size of their devices and the expected usage. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
The encoder only supports two error conditions: out of memory (need more buffer) and illegal simple types. It's possible for the encoder to encode an array or map with a size the decoder can't parse (UINT32_MAX), but that's not an error condition. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This method is recursive and O(n) on the number of elements in the payload. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This is the first convenience API. As such, this begins by skipping tagged values and it will notnot assert on the wrong types. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
The next commit will introduce a function to compare a CBOR text string with a const char * without extracting it. Since the iteration code is pretty much the same, just replacing memcpy with memcmp, we can reuse the same code. That makes it more maintainable in the future too. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
I tried to use mostly valid tag + data combinations in the test, even though the parser does and will not validate the combinations unless asked for it (in a function that doesn't exist yet). Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Again a silly mistake in sign-extension of (char)0xff to -1. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Wrong direction of the operator → we thought we overflowed when adding 0 to 0... Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This commit also starts to add unit tests. The API, as tested, works. The simplereader.c example is probably broken and will be fixed later. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This version compiles but does not work yet. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This version doesn't work yet. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-
由 Thiago Macieira 创作于
This code was originally part of a contribution to QtCore, see: https://codereview.qt-project.org/107465 https://codereview.qt-project.org/107466 This version does not compile nor work yet. Signed-off-by:
Thiago Macieira <thiago.macieira@intel.com>
-