Archived
1024 levels will probably be good enough for everyone, like cborparser.c. For those for whom it isn't, they can set the limit during the build. We already had this for the plain parser, so TinyCBOR wouldn't cause a stack overflow in case of a malformed stream (intentionally or not) when simply parsing and advancing over the stream. This same protection wasn't applied to the content converting from CBOR to JSON. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>