From 550ac1f25007d336cdb783fee2a3c2568377fa3b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Mar 2019 21:47:11 +0100 Subject: Fix build on old GCC --- lv2/atom/forge-overflow-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lv2') diff --git a/lv2/atom/forge-overflow-test.c b/lv2/atom/forge-overflow-test.c index 7a5d102..daad3f8 100644 --- a/lv2/atom/forge-overflow-test.c +++ b/lv2/atom/forge-overflow-test.c @@ -28,7 +28,7 @@ static int test_string_overflow(void) { static const size_t max_chars = 15; - static const size_t capacity = sizeof(LV2_Atom_String) + max_chars + 1; + static const size_t capacity = 8 + max_chars + 1; static const char* str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; uint8_t* buf = (uint8_t*)malloc(capacity); @@ -66,7 +66,7 @@ test_string_overflow(void) static int test_literal_overflow(void) { - static const size_t capacity = sizeof(LV2_Atom_Literal) + 2; + static const size_t capacity = 16 + 2; uint8_t* buf = (uint8_t*)malloc(capacity); LV2_URID_Map map = { NULL, urid_map }; -- cgit v1.2.1