lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 61d3516b authored by Michael Tremer's avatar Michael Tremer

country: Terminate buffer when reading from database

Compilers on ARM do not seem to initialise the buffer.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 89c4f1dd
......@@ -125,6 +125,9 @@ int loc_country_new_from_database_v1(struct loc_ctx* ctx, struct loc_stringpool*
// Read country code
loc_country_code_copy(buffer, dbobj->code);
// Terminate buffer
buffer[2] = '\0';
// Create a new country object
int r = loc_country_new(ctx, country, buffer);
if (r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment