bit-test-array-fixes
authorDovecot Maintainers <dovecot@packages.debian.org>
Thu, 14 May 2026 17:29:38 +0000 (13:29 -0400)
committerNoah Meyerhans <noahm@debian.org>
Thu, 14 May 2026 17:29:38 +0000 (13:29 -0400)
===================================================================

Gbp-Pq: Name 32-bit-test-array-fixes.patch

src/lib/test-array.c

index a0eeb2970a2e1f367c249ed473a6aa85ce59799b..1f2240c814f267db1c9dd47f8cab15d90f60061e 100644 (file)
@@ -461,7 +461,14 @@ enum fatal_test_state fatal_array(unsigned int stage)
 
                t_array_init(&arr, 2);
                array_push_back(&arr, value);
+               /* this test triggers different failures on 32- versus
+                * 64-bit architectures. It's a failure in both cases,
+                * so we just handle it... */
+#if SIZEOF_VOID_P == 4
+               test_expect_fatal_string("memory allocation overflow");
+#else
                test_expect_fatal_string("Buffer write out of range");
+#endif
                /* this is supposed to assert-crash before it even attempts to
                   access value */
                array_append(&arr, value, UINT_MAX);