Option to disable indefinite length string decoding (#61)

No semantic or interface changes.

Allows #define of QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS to disable handling of indefinite length strings and the memory pool saving 400 bytes of object code.

Also some minor code improvements and lots of improvements to comments on code that handles indefinite length strings.

Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/QCBOR.xcodeproj/project.pbxproj b/QCBOR.xcodeproj/project.pbxproj
index 1983591..9733eb7 100644
--- a/QCBOR.xcodeproj/project.pbxproj
+++ b/QCBOR.xcodeproj/project.pbxproj
@@ -56,6 +56,19 @@
 		E776E091214AE07500E67947 /* qcbor_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08E214AE07500E67947 /* qcbor_decode.c */; };
 		E776E097214AE0C700E67947 /* cmd_line_main.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E096214AE0C700E67947 /* cmd_line_main.c */; };
 		E7864766252CE63100A0C11B /* qcbor_err_to_str.c in Sources */ = {isa = PBXBuildFile; fileRef = E7864765252CE63100A0C11B /* qcbor_err_to_str.c */; };
+		E7FDBF04256C969D007138A8 /* qcbor_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08C214AE07400E67947 /* qcbor_encode.c */; };
+		E7FDBF05256C969D007138A8 /* ieee754.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B57582161CA690080D658 /* ieee754.c */; };
+		E7FDBF06256C969D007138A8 /* qcbor_err_to_str.c in Sources */ = {isa = PBXBuildFile; fileRef = E7864765252CE63100A0C11B /* qcbor_err_to_str.c */; };
+		E7FDBF07256C969D007138A8 /* half_to_double_from_rfc7049.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B575D2161CA7C0080D658 /* half_to_double_from_rfc7049.c */; };
+		E7FDBF08256C969D007138A8 /* run_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B57632161F8F70080D658 /* run_tests.c */; };
+		E7FDBF09256C969D007138A8 /* qcbor_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08E214AE07500E67947 /* qcbor_decode.c */; };
+		E7FDBF0A256C969D007138A8 /* float_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B575A2161CA7C0080D658 /* float_tests.c */; };
+		E7FDBF0B256C969D007138A8 /* qcbor_decode_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEB5216CE6CA00BA646B /* qcbor_decode_tests.c */; };
+		E7FDBF0C256C969D007138A8 /* UsefulBuf.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08D214AE07500E67947 /* UsefulBuf.c */; };
+		E7FDBF0D256C969D007138A8 /* qcbor_encode_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEB8216DC7AD00BA646B /* qcbor_encode_tests.c */; };
+		E7FDBF0E256C969D007138A8 /* cmd_line_main.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E096214AE0C700E67947 /* cmd_line_main.c */; };
+		E7FDBF0F256C969D007138A8 /* example.c in Sources */ = {isa = PBXBuildFile; fileRef = E743D0E124AC516D0017899F /* example.c */; };
+		E7FDBF10256C969D007138A8 /* UsefulBuf_Tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEBC216DE31700BA646B /* UsefulBuf_Tests.c */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -95,6 +108,15 @@
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 		};
+		E7FDBF12256C969D007138A8 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+		};
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
@@ -134,6 +156,7 @@
 		E78C91DF240C90C100F4CECE /* qcbor_common.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = qcbor_common.h; path = inc/qcbor/qcbor_common.h; sourceTree = "<group>"; tabWidth = 3; };
 		E78C91E0240C90C100F4CECE /* qcbor_private.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = qcbor_private.h; path = inc/qcbor/qcbor_private.h; sourceTree = "<group>"; tabWidth = 3; };
 		E78C91E1240C90C100F4CECE /* qcbor_encode.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = qcbor_encode.h; path = inc/qcbor/qcbor_encode.h; sourceTree = "<group>"; tabWidth = 3; };
+		E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = QCBOR_Disable_Indef; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -165,6 +188,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		E7FDBF11256C969D007138A8 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
@@ -199,6 +229,7 @@
 				E772022723B52C02006E966E /* QCBOR_Disable_Exp_Mantissa */,
 				E743D11B24DD4EF50017899F /* QCBOR_Disable_HW_Float */,
 				E743D13124DE05CC0017899F /* QCBOR_Disable_Preferred_Float */,
+				E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -321,6 +352,23 @@
 			productReference = E776E07C214ADF7F00E67947 /* QCBOR */;
 			productType = "com.apple.product-type.tool";
 		};
+		E7FDBF02256C969D007138A8 /* QCBOR_Disable_Indef */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = E7FDBF13256C969D007138A8 /* Build configuration list for PBXNativeTarget "QCBOR_Disable_Indef" */;
+			buildPhases = (
+				E7FDBF03256C969D007138A8 /* Sources */,
+				E7FDBF11256C969D007138A8 /* Frameworks */,
+				E7FDBF12256C969D007138A8 /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = QCBOR_Disable_Indef;
+			productName = QCBOR;
+			productReference = E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */;
+			productType = "com.apple.product-type.tool";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -352,6 +400,7 @@
 				E772021523B52C02006E966E /* QCBOR_Disable_Exp_Mantissa */,
 				E743D10924DD4EF50017899F /* QCBOR_Disable_HW_Float */,
 				E743D11E24DE05CC0017899F /* QCBOR_Disable_Preferred_Float */,
+				E7FDBF02256C969D007138A8 /* QCBOR_Disable_Indef */,
 			);
 		};
 /* End PBXProject section */
@@ -434,6 +483,26 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		E7FDBF03256C969D007138A8 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E7FDBF04256C969D007138A8 /* qcbor_encode.c in Sources */,
+				E7FDBF05256C969D007138A8 /* ieee754.c in Sources */,
+				E7FDBF06256C969D007138A8 /* qcbor_err_to_str.c in Sources */,
+				E7FDBF07256C969D007138A8 /* half_to_double_from_rfc7049.c in Sources */,
+				E7FDBF08256C969D007138A8 /* run_tests.c in Sources */,
+				E7FDBF09256C969D007138A8 /* qcbor_decode.c in Sources */,
+				E7FDBF0A256C969D007138A8 /* float_tests.c in Sources */,
+				E7FDBF0B256C969D007138A8 /* qcbor_decode_tests.c in Sources */,
+				E7FDBF0C256C969D007138A8 /* UsefulBuf.c in Sources */,
+				E7FDBF0D256C969D007138A8 /* qcbor_encode_tests.c in Sources */,
+				E7FDBF0E256C969D007138A8 /* cmd_line_main.c in Sources */,
+				E7FDBF0F256C969D007138A8 /* example.c in Sources */,
+				E7FDBF10256C969D007138A8 /* UsefulBuf_Tests.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin XCBuildConfiguration section */
@@ -670,6 +739,35 @@
 			};
 			name = Release;
 		};
+		E7FDBF14256C969D007138A8 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+				CODE_SIGN_STYLE = Automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS;
+				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+				GCC_WARN_PEDANTIC = YES;
+				"HEADER_SEARCH_PATHS[arch=*]" = inc;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		E7FDBF15256C969D007138A8 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+				CODE_SIGN_STYLE = Automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+				GCC_WARN_PEDANTIC = YES;
+				"HEADER_SEARCH_PATHS[arch=*]" = inc;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -718,6 +816,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		E7FDBF13256C969D007138A8 /* Build configuration list for PBXNativeTarget "QCBOR_Disable_Indef" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E7FDBF14256C969D007138A8 /* Debug */,
+				E7FDBF15256C969D007138A8 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = E776E074214ADF7F00E67947 /* Project object */;
diff --git a/README.md b/README.md
index 906bf41..1b84140 100644
--- a/README.md
+++ b/README.md
@@ -231,8 +231,8 @@
     |               | smallest | largest |  
     |---------------|----------|---------|
     | encode only   |      850 |    2100 |
-    | decode only   |     2900 |   13500 |
-    | combined      |     3750 |   15600 |
+    | decode only   |     2500 |   13500 |
+    | combined      |     3350 |   15600 |
     
  From the table above, one can see that the amount of code pulled in
  from the QCBOR library varies a lot, ranging from 1KB to 15KB.  The
@@ -273,8 +273,9 @@
  Disable features with defines like
  QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA (saves about 400 bytes) 
  QCBOR_DISABLE_ENCODE_USAGE_GUARDS (saves about 150), and
- QCBOR_DISABLE_PREFERRED_FLOAT (saves about 900 bytes).  More of these
- defines are planned than are currently implemented.
+ QCBOR_DISABLE_PREFERRED_FLOAT (saves about 900 bytes), and
+ QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS (saves about 400 bytes).  More
+  of these defines are planned than are currently implemented.
  
  If QCBOR is installed as a shared library, then of course only one
  copy of the code is in memory no matter how many applications use it.
diff --git a/inc/qcbor/qcbor_common.h b/inc/qcbor/qcbor_common.h
index 1c76a8a..d9a0dbe 100644
--- a/inc/qcbor/qcbor_common.h
+++ b/inc/qcbor/qcbor_common.h
@@ -466,7 +466,11 @@
        infinity or -infinity was encountered in encoded CBOR. Usually
        this because conversion of the float-point value was being
        attempted. */
-    QCBOR_ERR_FLOAT_EXCEPTION = 42,
+   QCBOR_ERR_FLOAT_EXCEPTION = 42,
+
+   /** Indefinite length string handling is disabled and there is an
+       indefinite length string in the input CBOR. */
+   QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED = 43,
 
    /* This is stored in uint8_t; never add values > 255 */
 } QCBORError;
diff --git a/inc/qcbor/qcbor_private.h b/inc/qcbor/qcbor_private.h
index b161752..77e6fca 100644
--- a/inc/qcbor/qcbor_private.h
+++ b/inc/qcbor/qcbor_private.h
@@ -276,6 +276,18 @@
 #define CBOR_MAJOR_NONE_TYPE_SIMPLE_BREAK \
             CBOR_MAJOR_TYPE_SIMPLE + QCBOR_INDEFINITE_LEN_TYPE_MODIFIER
 
+
+/* Value of QCBORItem.val.string.len when the string length is
+ * indefinite. Used temporarily in the implementation and never
+ * returned in the public interface.
+ */
+#define QCBOR_STRING_LENGTH_INDEFINITE SIZE_MAX
+
+
+/* The number of elements in a C array of a particular type */
+#define C_ARRAY_COUNT(array, type) (sizeof(array)/sizeof(type))
+
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index 7b41ff3..efe6ebc 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -478,7 +478,7 @@
 }
 
 
-
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
 /*===========================================================================
    QCBORStringAllocate -- STRING ALLOCATOR INVOCATION
 
@@ -516,7 +516,7 @@
       (pMe->pfAllocator)(pMe->pAllocateCxt, NULL, 0);
    }
 }
-
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
 
 /*===========================================================================
@@ -544,6 +544,8 @@
 }
 
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+
 /*
  Public function, see header file
  */
@@ -556,6 +558,7 @@
    pMe->StringAllocator.pAllocateCxt  = pAllocateContext;
    pMe->bStringAllocateAll            = bAllStrings;
 }
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
 
 /*
@@ -843,7 +846,6 @@
  @retval QCBOR_ERR_STRING_TOO_LONG
  */
 static inline QCBORError DecodeBytes(const QCORInternalAllocator *pAllocator,
-                                     int nMajorType,
                                      uint64_t uStrLen,
                                      UsefulInputBuf *pUInBuf,
                                      QCBORItem *pDecodedItem)
@@ -868,6 +870,7 @@
       goto Done;
    }
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
    if(pAllocator) {
       // We are asked to use string allocator to make a copy
       UsefulBuf NewMem = StringAllocator_Allocate(pAllocator, (size_t)uStrLen);
@@ -877,23 +880,33 @@
       }
       pDecodedItem->val.string = UsefulBuf_Copy(NewMem, Bytes);
       pDecodedItem->uDataAlloc = 1;
-   } else {
-      // Normal case with no string allocator
-      pDecodedItem->val.string = Bytes;
+      goto Done;
    }
-   const bool bIsBstr = (nMajorType == CBOR_MAJOR_TYPE_BYTE_STRING);
-   // Cast because ternary operator causes promotion to integer
-   pDecodedItem->uDataType = (uint8_t)(bIsBstr ? QCBOR_TYPE_BYTE_STRING
-                                               : QCBOR_TYPE_TEXT_STRING);
+#else /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+   (void)pAllocator;
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
+   // Normal case with no string allocator
+   pDecodedItem->val.string = Bytes;
 
 Done:
    return nReturn;
 }
 
 
+/* Map the CBOR major types for strings to the QCBOR types for strngs */
+static inline uint8_t MapStringMajorTypes(int nCBORMajorType)
+{
+   #if CBOR_MAJOR_TYPE_BYTE_STRING + 4 != QCBOR_TYPE_BYTE_STRING
+   #error QCBOR_TYPE_BYTE_STRING no lined up with major type
+   #endif
 
+   #if CBOR_MAJOR_TYPE_TEXT_STRING + 4 != QCBOR_TYPE_TEXT_STRING
+   #error QCBOR_TYPE_TEXT_STRING no lined up with major type
+   #endif
 
-
+   return (uint8_t)(nCBORMajorType + 4);
+}
 
 
 // Make sure the constants align as this is assumed by
@@ -969,13 +982,11 @@
 
       case CBOR_MAJOR_TYPE_BYTE_STRING: // Major type 2
       case CBOR_MAJOR_TYPE_TEXT_STRING: // Major type 3
+         pDecodedItem->uDataType = MapStringMajorTypes(nMajorType);
          if(nAdditionalInfo == LEN_IS_INDEFINITE) {
-            const bool bIsBstr = (nMajorType == CBOR_MAJOR_TYPE_BYTE_STRING);
-            pDecodedItem->uDataType = (uint8_t)(bIsBstr ? QCBOR_TYPE_BYTE_STRING
-                                                        : QCBOR_TYPE_TEXT_STRING);
-            pDecodedItem->val.string = (UsefulBufC){NULL, SIZE_MAX};
+            pDecodedItem->val.string = (UsefulBufC){NULL, QCBOR_STRING_LENGTH_INDEFINITE};
          } else {
-            nReturn = DecodeBytes(pAllocator, nMajorType, uNumber, pUInBuf, pDecodedItem);
+            nReturn = DecodeBytes(pAllocator, uNumber, pUInBuf, pDecodedItem);
          }
          break;
 
@@ -994,7 +1005,7 @@
          }
          // C preproc #if above makes sure constants for major types align
          // DecodeTypeAndNumber never returns a major type > 7 so cast is safe
-         pDecodedItem->uDataType  = (uint8_t)nMajorType;
+         pDecodedItem->uDataType = (uint8_t)nMajorType;
          break;
 
       case CBOR_MAJOR_TYPE_OPTIONAL: // Major type 6, optional prepended tags
@@ -1022,130 +1033,161 @@
 }
 
 
-
-/*
- This layer deals with indefinite length strings. It pulls all the
- individual chunk items together into one QCBORItem using the string
- allocator.
-
- Code Reviewers: THIS FUNCTION DOES A LITTLE POINTER MATH
-
- @retval QCBOR_ERR_UNSUPPORTED
-
- @retval QCBOR_ERR_HIT_END
-
- @retval QCBOR_ERR_INT_OVERFLOW
-
- @retval QCBOR_ERR_STRING_ALLOCATE
-
- @retval QCBOR_ERR_STRING_TOO_LONG
-
- @retval QCBOR_ERR_HALF_PRECISION_DISABLED
-
- @retval QCBOR_ERR_BAD_TYPE_7
-
- @retval QCBOR_ERR_NO_STRING_ALLOCATOR
-
- @retval QCBOR_ERR_INDEFINITE_STRING_CHUNK
+/**
+ * @brief Process indefinite length strings
+ *
+ * @param[in] pMe   Decoder context
+ * @param[in,out] pDecodedItem  The decoded item that work is done on.
+ *
+ * @retval QCBOR_ERR_UNSUPPORTED
+ * @retval QCBOR_ERR_HIT_END
+ * @retval QCBOR_ERR_INT_OVERFLOW
+ * @retval QCBOR_ERR_STRING_ALLOCATE
+ * @retval QCBOR_ERR_STRING_TOO_LONG
+ * @retval QCBOR_ERR_HALF_PRECISION_DISABLED
+ * @retval QCBOR_ERR_BAD_TYPE_7
+ * @retval QCBOR_ERR_NO_STRING_ALLOCATOR
+ * @retval QCBOR_ERR_INDEFINITE_STRING_CHUNK
+ *
+ * If @c pDecodedItem is not an indefinite length string, this does nothing.
+ *
+ * If it is, this loops getting the subsequent chunks that make up the
+ * string.  The string allocator is used to make a contiguous buffer for
+ * the chunks.  When this completes @c pDecodedItem contains the
+ * put-together string.
+ *
+ * Code Reviewers: THIS FUNCTION DOES A LITTLE POINTER MATH
  */
 static inline QCBORError
-GetNext_FullItem(QCBORDecodeContext *me, QCBORItem *pDecodedItem)
+GetNext_FullItem(QCBORDecodeContext *pMe, QCBORItem *pDecodedItem)
 {
-   // Stack usage; int/ptr 2 UsefulBuf 2 QCBORItem  -- 96
+   /* Aproximate stack usage
+    *                                             64-bit      32-bit
+    *   local vars                                    32          16
+    *   2 UsefulBufs                                  32          16
+    *   QCBORItem                                     56          52
+    *   TOTAL                                        120          74
+    */
 
-   // Get pointer to string allocator. First use is to pass it to
-   // GetNext_Item() when option is set to allocate for *every* string.
-   // Second use here is to allocate space to coallese indefinite
-   // length string items into one.
-   const QCORInternalAllocator *pAllocator = me->StringAllocator.pfAllocator ?
-                                                      &(me->StringAllocator) :
-                                                      NULL;
+   /* The string allocator is used here for two purposes: 1)
+    * coalescing the chunks of an indefinite length string, 2)
+    * allocating storage for every string returned.
+    *
+    * The first use is below in this function. Indefinite length
+    * strings cannot be processed at all without a string allocator.
+    *
+    * The second used is in DecodeBytes() which is called by
+    * GetNext_Item() below. This second use unneccessary for most use
+    * and only happens when requested in the call to
+    * QCBORDecode_SetMemPool(). If the second use not requested then
+    * NULL is passed for the string allocator to GetNext_Item().
+    *
+    * QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS disables the string
+    * allocator altogether and thus both of these uses. It reduced the
+    * decoder object code by about 400 bytes.
+    */
+   const QCORInternalAllocator *pAllocatorForGetNext = NULL;
 
-   QCBORError nReturn;
-   nReturn = GetNext_Item(&(me->InBuf),
-                          pDecodedItem,
-                          me->bStringAllocateAll ? pAllocator: NULL);
-   if(nReturn) {
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+   const QCORInternalAllocator *pAllocator = NULL;
+
+   if(pMe->StringAllocator.pfAllocator) {
+      pAllocator = &(pMe->StringAllocator);
+      if(pMe->bStringAllocateAll) {
+         pAllocatorForGetNext = pAllocator;
+      }
+   }
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
+   QCBORError uReturn;
+   uReturn = GetNext_Item(&(pMe->InBuf), pDecodedItem, pAllocatorForGetNext);
+   if(uReturn != QCBOR_SUCCESS) {
       goto Done;
    }
 
-   // To reduce code size by removing support for indefinite length strings, the
-   // code in this function from here down can be eliminated. Run tests, except
-   // indefinite length string tests, to be sure all is OK if this is removed.
-
-   // Only do indefinite length processing on strings
+   /* Only do indefinite length processing on strings */
    const uint8_t uStringType = pDecodedItem->uDataType;
    if(uStringType!= QCBOR_TYPE_BYTE_STRING && uStringType != QCBOR_TYPE_TEXT_STRING) {
-      goto Done; // no need to do any work here on non-string types
-   }
-
-   // Is this a string with an indefinite length?
-   if(pDecodedItem->val.string.len != SIZE_MAX) {
-      goto Done; // length is not indefinite, so no work to do here
-   }
-
-   // Can't do indefinite length strings without a string allocator
-   if(pAllocator == NULL) {
-      nReturn = QCBOR_ERR_NO_STRING_ALLOCATOR;
       goto Done;
    }
 
-   // Loop getting chunks of the indefinite length string
+   /* Is this a string with an indefinite length? */
+   if(pDecodedItem->val.string.len != QCBOR_STRING_LENGTH_INDEFINITE) {
+      goto Done;
+   }
+
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+   /* Can't do indefinite length strings without a string allocator */
+   if(pAllocator == NULL) {
+      uReturn = QCBOR_ERR_NO_STRING_ALLOCATOR;
+      goto Done;
+   }
+
+   /* Loop getting chunks of the indefinite length string */
    UsefulBufC FullString = NULLUsefulBufC;
 
    for(;;) {
-      // Get item for next chunk
+      /* Get QCBORItem for next chunk */
       QCBORItem StringChunkItem;
-      // NULL string allocator passed here. Do not need to allocate
-      // chunks even if bStringAllocateAll is set.
-      nReturn = GetNext_Item(&(me->InBuf), &StringChunkItem, NULL);
-      if(nReturn) {
-         break;  // Error getting the next chunk
+      /* Pass a NULL string allocator to GetNext_Item() because the
+       * individual string chunks in an indefinite length should not
+       * be allocated. They are always copied in the the contiguous
+       * buffer allocated here.
+       */
+      uReturn = GetNext_Item(&(pMe->InBuf), &StringChunkItem, NULL);
+      if(uReturn) {
+         break;
       }
 
-      // See if it is a marker at end of indefinite length string
+      /* Is item is the marker for end of the indefinite length string? */
       if(StringChunkItem.uDataType == QCBOR_TYPE_BREAK) {
-         // String is complete
+         /* String is complete */
          pDecodedItem->val.string = FullString;
          pDecodedItem->uDataAlloc = 1;
          break;
       }
 
-      // Match data type of chunk to type at beginning.
-      // Also catches error of other non-string types that don't belong.
-      // Also catches indefinite length strings inside indefinite length strings
+      /* All chunks must be of the same type, the type of the item
+       * that introduces the indefinite length string. This also
+       * catches errors where the chunk is not a string at all and an
+       * indefinite length string inside an indefinite length string.
+       */
       if(StringChunkItem.uDataType != uStringType ||
-         StringChunkItem.val.string.len == SIZE_MAX) {
-         nReturn = QCBOR_ERR_INDEFINITE_STRING_CHUNK;
+         StringChunkItem.val.string.len == QCBOR_STRING_LENGTH_INDEFINITE) {
+         uReturn = QCBOR_ERR_INDEFINITE_STRING_CHUNK;
          break;
       }
 
-      // Alloc new buffer or expand previously allocated buffer so it can fit
-      // The first time throurgh FullString.ptr is NULL and this is
-      // equivalent to StringAllocator_Allocate()
+      /* The first time throurgh FullString.ptr is NULL and this is
+       * equivalent to StringAllocator_Allocate(). Subsequently it is
+       * not NULL and a reallocation happens.
+       */
       UsefulBuf NewMem = StringAllocator_Reallocate(pAllocator,
                                                     UNCONST_POINTER(FullString.ptr),
                                                     FullString.len + StringChunkItem.val.string.len);
 
       if(UsefulBuf_IsNULL(NewMem)) {
-         // Allocation of memory for the string failed
-         nReturn = QCBOR_ERR_STRING_ALLOCATE;
+         uReturn = QCBOR_ERR_STRING_ALLOCATE;
          break;
       }
 
-      // Copy new string chunk at the end of string so far.
+      /* Copy new string chunk to the end of accumulated string */
       FullString = UsefulBuf_CopyOffset(NewMem, FullString.len, StringChunkItem.val.string);
    }
 
-   if(nReturn != QCBOR_SUCCESS && !UsefulBuf_IsNULLC(FullString)) {
-      // Getting the item failed, clean up the allocated memory
+   if(uReturn != QCBOR_SUCCESS && !UsefulBuf_IsNULLC(FullString)) {
+      /* Getting the item failed, clean up the allocated memory */
       StringAllocator_Free(pAllocator, UNCONST_POINTER(FullString.ptr));
    }
+#else /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+   uReturn = QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED;
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
 Done:
-   return nReturn;
+   return uReturn;
 }
 
+
 static uint64_t ConvertTag(const QCBORDecodeContext *me, uint16_t uTagVal) {
    if(uTagVal <= QCBOR_LAST_UNMAPPED_TAG) {
       return uTagVal;
@@ -2206,9 +2248,11 @@
    }
 
 Done:
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
    // Call the destructor for the string allocator if there is one.
    // Always called, even if there are errors; always have to clean up
    StringAllocator_Destruct(&(me->StringAllocator));
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
    return uReturn;
 }
@@ -2281,6 +2325,7 @@
 
 
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
 
 /* ===========================================================================
    MemPool -- BUILT-IN SIMPLE STRING ALLOCATOR
@@ -2461,6 +2506,7 @@
 
    return QCBOR_SUCCESS;
 }
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
 
 
diff --git a/test/not_well_formed_cbor.h b/test/not_well_formed_cbor.h
index e905cd1..efe2c33 100644
--- a/test/not_well_formed_cbor.h
+++ b/test/not_well_formed_cbor.h
@@ -28,6 +28,7 @@
 
     // Indefinite length strings must be closed off
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
     // An indefinite length byte string not closed off
     {(uint8_t[]){0x5f, 0x41, 0x00}, 3},
     // An indefinite length text string not closed off
@@ -58,6 +59,8 @@
     // indefinite length text string with indefinite string inside
     {(uint8_t[]){0x7f, 0x7f, 0x61, 0x00, 0xff, 0xff}, 6},
 
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
     // Definte length maps and arrays must be closed by having the
     // right number of items
 
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 6ee22fd..9a5dc6d 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -1635,7 +1635,8 @@
 {
    // Loop over all the not-well-formed instance of CBOR
    // that are test vectors in not_well_formed_cbor.h
-   const uint16_t nArraySize = sizeof(paNotWellFormedCBOR)/sizeof(struct someBinaryBytes);
+   const uint16_t nArraySize = C_ARRAY_COUNT(paNotWellFormedCBOR,
+                                             struct someBinaryBytes);
    for(uint16_t nIterate = 0; nIterate < nArraySize; nIterate++) {
       const struct someBinaryBytes *pBytes = &paNotWellFormedCBOR[nIterate];
       const UsefulBufC Input = (UsefulBufC){pBytes->p, pBytes->n};
@@ -1644,8 +1645,10 @@
       // string test cases
       QCBORDecodeContext DCtx;
       QCBORDecode_Init(&DCtx, Input, QCBOR_DECODE_MODE_NORMAL);
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
       UsefulBuf_MAKE_STACK_UB(Pool, 100);
       QCBORDecode_SetMemPool(&DCtx, Pool, 0);
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
       // Loop getting items until no more to get
       QCBORError uCBORError;
@@ -1680,13 +1683,19 @@
       // Set up the decoding context including a memory pool so that
       // indefinite length items can be checked
       QCBORDecodeContext DCtx;
+      QCBORError nCBORError;
+
       QCBORDecode_Init(&DCtx, pF->Input, QCBOR_DECODE_MODE_NORMAL);
+
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
       UsefulBuf_MAKE_STACK_UB(Pool, 100);
 
-      QCBORError nCBORError = QCBORDecode_SetMemPool(&DCtx, Pool, 0);
+      nCBORError = QCBORDecode_SetMemPool(&DCtx, Pool, 0);
       if(nCBORError) {
          return -9;
       }
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
 
       // Iterate until there is an error of some sort error
       QCBORItem Item;
@@ -1716,6 +1725,7 @@
    // Most of this is copied from not_well_formed.h. Here the error code
    // returned is also checked.
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
    // Indefinite length strings must be closed off
    // An indefinite length byte string not closed off
    { {(uint8_t[]){0x5f, 0x41, 0x00}, 3}, QCBOR_ERR_HIT_END },
@@ -1745,6 +1755,36 @@
    // indefinite length text string with indefinite string inside
    { {(uint8_t[]){0x7f, 0x7f, 0x61, 0x00, 0xff, 0xff}, 6}, QCBOR_ERR_INDEFINITE_STRING_CHUNK},
 
+#else /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
+   { {(uint8_t[]){0x5f, 0x41, 0x00}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // An indefinite length text string not closed off
+   { {(uint8_t[]){0x7f, 0x61, 0x00}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+
+
+   // All the chunks in an indefinite length string must be of the type of
+   // indefinite length string
+   // indefinite length byte string with text string chunk
+   { {(uint8_t[]){0x5f, 0x61, 0x00, 0xff}, 4}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length text string with a byte string chunk
+   { {(uint8_t[]){0x7f, 0x41, 0x00, 0xff}, 4}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with an positive integer chunk
+   { {(uint8_t[]){0x5f, 0x00, 0xff}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with an negative integer chunk
+   { {(uint8_t[]){0x5f, 0x21, 0xff}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with an array chunk
+   { {(uint8_t[]){0x5f, 0x80, 0xff}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with an map chunk
+   { {(uint8_t[]){0x5f, 0xa0, 0xff}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with tagged integer chunk
+   { {(uint8_t[]){0x5f, 0xc0, 0x00, 0xff}, 4}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   // indefinite length byte string with an simple type chunk
+   { {(uint8_t[]){0x5f, 0xe0, 0xff}, 3}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED },
+   { {(uint8_t[]){0x5f, 0x5f, 0x41, 0x00, 0xff, 0xff}, 6}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED},
+   // indefinite length text string with indefinite string inside
+   { {(uint8_t[]){0x7f, 0x7f, 0x61, 0x00, 0xff, 0xff}, 6}, QCBOR_ERR_INDEF_LEN_STRINGS_DISABLED},
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
 
    // Definte length maps and arrays must be closed by having the right number of items
    // A definte length array that is supposed to have 1 item, but has none
@@ -2031,7 +2071,7 @@
 {
    int32_t nResult;
 
-   nResult = ProcessFailures(Failures, sizeof(Failures)/sizeof(struct FailInput));
+   nResult = ProcessFailures(Failures,C_ARRAY_COUNT(Failures,struct FailInput));
    if(nResult) {
       return nResult;
    }
@@ -3632,7 +3672,6 @@
    return 0;
 }
 
-
 // [1, [2, 3]]
 static const uint8_t spIndefiniteArray[]     = {0x9f, 0x01, 0x82, 0x02, 0x03, 0xff};
 // No closing break
@@ -3653,13 +3692,10 @@
     UsefulBufC IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArray);
 
     // Decode it and see if it is OK
-    UsefulBuf_MAKE_STACK_UB(MemPool, 150);
     QCBORDecodeContext DC;
     QCBORItem Item;
     QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-    QCBORDecode_SetMemPool(&DC, MemPool, false);
-
     QCBORDecode_GetNext(&DC, &Item);
 
     if(Item.uDataType != QCBOR_TYPE_ARRAY ||
@@ -3705,8 +3741,6 @@
 
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-   QCBORDecode_SetMemPool(&DC, MemPool, false);
-
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -7;
@@ -3723,8 +3757,6 @@
 
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-   QCBORDecode_SetMemPool(&DC, MemPool, false);
-
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -9;
@@ -3751,8 +3783,6 @@
 
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-   QCBORDecode_SetMemPool(&DC, MemPool, false);
-
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -13;
@@ -3774,8 +3804,6 @@
 
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-   QCBORDecode_SetMemPool(&DC, MemPool, false);
-
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -15;
@@ -3796,8 +3824,6 @@
 
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
 
-   QCBORDecode_SetMemPool(&DC, MemPool, false);
-
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -18;
@@ -3812,6 +3838,8 @@
 }
 
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+
 static const uint8_t spIndefiniteLenString[] = {
    0x81, // Array of length one
    0x7f, // text string marked with indefinite length
@@ -4196,7 +4224,6 @@
 }
 
 
-
 int32_t MemPoolTest(void)
 {
    // Set up the decoder with a tiny bit of CBOR to parse because
@@ -4327,6 +4354,8 @@
 
    return 0;
 }
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+
 
 #ifndef QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA
 
@@ -4625,7 +4654,8 @@
 int32_t ExponentAndMantissaDecodeFailTests()
 {
    return ProcessFailures(ExponentAndMantissaFailures,
-                          sizeof(ExponentAndMantissaFailures)/sizeof(struct FailInput));
+                          C_ARRAY_COUNT(ExponentAndMantissaFailures,
+                                        struct FailInput));
 }
 
 #endif /* QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA */
@@ -5411,6 +5441,7 @@
       -18446744073709551617.0,
       QCBOR_SUCCESS
    },
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
    {
       "Positive bignum 0x01020304 indefinite length string",
       {(uint8_t[]){0xC2, 0x5f, 0x42, 0x01, 0x02, 0x41, 0x03, 0x41, 0x04, 0xff}, 10},
@@ -5421,6 +5452,7 @@
       16909060.0,
       QCBOR_SUCCESS
    },
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
    {
       "Decimal Fraction with neg bignum [9223372036854775807, -4759477275222530853137]",
       {(uint8_t[]){0xC4, 0x82, 0x1B, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -5807,9 +5839,25 @@
 
 
 
+
+static int32_t SetUpDecoder(QCBORDecodeContext *DCtx, UsefulBufC CBOR, UsefulBuf Pool)
+{
+   QCBORDecode_Init(DCtx, CBOR, QCBOR_DECODE_MODE_NORMAL);
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+   if(QCBORDecode_SetMemPool(DCtx, Pool, 0)) {
+      return 1;
+   }
+#else /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+   (void)Pool;
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
+   return 0;
+}
+
+
 int32_t IntegerConvertTest()
 {
-   const int nNumTests = sizeof(NumberConversions)/sizeof(struct NumberConversion);
+   const int nNumTests = C_ARRAY_COUNT(NumberConversions,
+                                       struct NumberConversion);
 
    for(int nIndex = 0; nIndex < nNumTests; nIndex++) {
       const struct NumberConversion *pF = &NumberConversions[nIndex];
@@ -5820,10 +5868,8 @@
       UsefulBuf_MAKE_STACK_UB(Pool, 100);
 
       /* ----- test conversion to int64_t ------ */
-      QCBORDecode_Init(&DCtx, pF->CBOR, QCBOR_DECODE_MODE_NORMAL);
-      QCBORError nCBORError = QCBORDecode_SetMemPool(&DCtx, Pool, 0);
-      if(nCBORError) {
-         return (int32_t)(1000+nIndex);
+      if(SetUpDecoder(&DCtx, pF->CBOR, Pool)) {
+         return (int32_t)(3333+nIndex);
       }
 
       int64_t nInt;
@@ -5836,11 +5882,10 @@
       }
 
       /* ----- test conversion to uint64_t ------ */
-      QCBORDecode_Init(&DCtx, pF->CBOR, QCBOR_DECODE_MODE_NORMAL);
-      nCBORError = QCBORDecode_SetMemPool(&DCtx, Pool, 0);
-      if(nCBORError) {
-         return (int32_t)(1000+nIndex);
+      if(SetUpDecoder(&DCtx, pF->CBOR, Pool)) {
+         return (int32_t)(3333+nIndex);
       }
+
       uint64_t uInt;
       QCBORDecode_GetUInt64ConvertAll(&DCtx, 0xffff, &uInt);
       if(QCBORDecode_GetError(&DCtx) != pF->uErrorUint64) {
@@ -5851,10 +5896,8 @@
       }
 
       /* ----- test conversion to double ------ */
-      QCBORDecode_Init(&DCtx, pF->CBOR, QCBOR_DECODE_MODE_NORMAL);
-      nCBORError = QCBORDecode_SetMemPool(&DCtx, Pool, 0);
-      if(nCBORError) {
-         return (int32_t)(1000+nIndex);
+       if(SetUpDecoder(&DCtx, pF->CBOR, Pool)) {
+         return (int32_t)(3333+nIndex);
       }
 #ifndef QCBOR_DISABLE_FLOAT_HW_USE
       double d;
@@ -6685,6 +6728,8 @@
 }
 
 
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+
 static const uint8_t spMapWithIndefLenStrings[] = {
    0xbf,
       0x7f, 0x61, 'l', 0x64, 'a', 'b', 'e', 'l' , 0x61, '1', 0xff,
@@ -6756,7 +6801,7 @@
 
    return 0;
 }
-
+#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 
 
 
diff --git a/test/run_tests.c b/test/run_tests.c
index aa42013..b2dc46c 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -63,7 +63,6 @@
     TEST_ENTRY(EmptyMapsAndArraysTest),
     TEST_ENTRY(NotWellFormedTests),
     TEST_ENTRY(ParseMapAsArrayTest),
-    TEST_ENTRY(AllocAllStringsTest),
     TEST_ENTRY(IndefiniteLengthNestTest),
     TEST_ENTRY(NestedMapTestIndefLen),
     TEST_ENTRY(ParseSimpleTest),
@@ -95,8 +94,13 @@
     TEST_ENTRY(ParseDeepArrayTest),
     TEST_ENTRY(SimpleArrayTest),
     TEST_ENTRY(IntegerValuesParseTest),
+#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
+    TEST_ENTRY(AllocAllStringsTest),
     TEST_ENTRY(MemPoolTest),
     TEST_ENTRY(IndefiniteLengthStringTest),
+    TEST_ENTRY(SpiffyIndefiniteLengthStringsTests),
+    TEST_ENTRY(SetUpAllocatorTest),
+#endif /* #ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
 #ifndef QCBOR_DISABLE_PREFERRED_FLOAT
     TEST_ENTRY(HalfPrecisionDecodeBasicTests),
     TEST_ENTRY(DoubleAsSmallestTest),
@@ -112,7 +116,6 @@
     TEST_ENTRY_DISABLED(BigComprehensiveInputTest),
     TEST_ENTRY_DISABLED(TooLargeInputTest),
     TEST_ENTRY(EncodeErrorTests),
-    TEST_ENTRY(SetUpAllocatorTest),
     TEST_ENTRY(SimpleValuesIndefiniteLengthTest1),
     TEST_ENTRY(EncodeLengthThirtyoneTest),
     TEST_ENTRY(CBORSequenceDecodeTests),
@@ -124,7 +127,6 @@
     TEST_ENTRY(ExponentAndMantissaDecodeTests),
     TEST_ENTRY(ExponentAndMantissaDecodeFailTests),
     TEST_ENTRY(ExponentAndMantissaEncodeTests),
-    TEST_ENTRY(SpiffyIndefiniteLengthStringsTests),
 #endif /* QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA */
 };