QCBOR: Fix mem alignment bug decoding indefinite length strings
All tests pass on CPUs not supporting unaligned memory
access. Internal MemPool redesign and QCBORDecode_SetUpAllocator
interface changed. Issue only occured when MemPool was used
to decode indefinite length strings.
Change-Id: I7e7ed4eb6a15c445d80ba753241dc1392951f3c1
Signed-off-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/lib/ext/qcbor/inc/UsefulBuf.h b/lib/ext/qcbor/inc/UsefulBuf.h
index fa17b6c..86a7da7 100644
--- a/lib/ext/qcbor/inc/UsefulBuf.h
+++ b/lib/ext/qcbor/inc/UsefulBuf.h
@@ -66,6 +66,10 @@
#include <string.h> // for strlen, memcpy, memmove, memset
#include <stddef.h> // for size_t
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
@file UsefulBuf.h
@@ -1531,6 +1535,10 @@
}
+#ifdef __cplusplus
+}
+#endif
+
#endif // _UsefulBuf_h