Better error for _EnterBstrWrapped on allocated (indef) strings (#221)
Better error for QCBORDecode_EnterBstrWrapped on allocated strings. Since indefinite-length strings are always allocated, this gives a better error for attempts to use this on indefinite-length strings.
The TODO: to make this work is closed out as it was decided not to support QCBORDecode_EnterBstrWrapped() on indefinite-length strings. To do so would require increasing the size of QCBORItem.
* Add limitations comment
---------
Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/inc/qcbor/qcbor_encode.h b/inc/qcbor/qcbor_encode.h
index 75b4d64..774f272 100644
--- a/inc/qcbor/qcbor_encode.h
+++ b/inc/qcbor/qcbor_encode.h
@@ -366,6 +366,7 @@
* - Tags on labels are ignored during decoding.
* - The maximum tag nesting is @c QCBOR_MAX_TAGS_PER_ITEM (typically 4).
* - Works only on 32- and 64-bit CPUs.
+ * - QCBORDecode_EnterBstrWrapped() doesn't work on indefinite-length strings.
*
* The public interface uses @c size_t for all lengths. Internally the
* implementation uses 32-bit lengths by design to use less memory and