CBOR-to-JSON: validate UTF-8 content is correct

We were passing through anything that wasn't a control character, so
invalid CBOR text strings were passed through to invalid JSON.

As we have the get_utf8() function for cborvalidation.c, let's use it to
validate here too.

Fixes #331.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
3 files changed