From ae5f72b7fe8ea0c597742fa0596bd8c993a15038 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 22 Oct 2020 11:03:16 -0400 Subject: [PATCH] TT#98400 increase acc_backup/trash insert buffer size With the increased length of src/dst_leg strings, we must also increase the buffer size for the insert string. Did I mention that we should really move to dynamic strings here... Change-Id: I0e77155d36f434055e36124d37bf699179f887b1 --- medmysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medmysql.c b/medmysql.c index d9bf0f1..0085280 100644 --- a/medmysql.c +++ b/medmysql.c @@ -421,7 +421,7 @@ void medmysql_cleanup() int medmysql_insert_records(med_entry_t *records, uint64_t count, const char *table) { char *sql_buffer = NULL; - size_t sql_buffer_size = (count + 1) * 1024; // some extra space for sql overhead + size_t sql_buffer_size = (count + 1) * (sizeof(med_entry_t) + 64) + 256; size_t buflen = 0; int ret = 0, entries = 0;