From 471f14307823175df31dcbd763533602fd228eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kn=C3=A1pek?= Date: Wed, 20 May 2026 02:45:00 +0200 Subject: [PATCH] Fix UBSAN errors src/encauth/siv/siv.c:164:19: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here src/misc/compare_testvector.c:63:25: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:65:33: note: nonnull attribute specified here --- src/misc/compare_testvector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/compare_testvector.c b/src/misc/compare_testvector.c index 874794ff..fd8ae0c7 100644 --- a/src/misc/compare_testvector.c +++ b/src/misc/compare_testvector.c @@ -59,7 +59,7 @@ int ltc_compare_testvector(const void* is, const unsigned long is_len, const voi int res = 0; if(is_len != should_len) { res = is_len > should_len ? -1 : 1; - } else if (is_len == 0) { + } else if (is_len == 0 && (!is || !should)) { res = 0; } else { res = XMEMCMP(is, should, is_len);