Serialize integer-ish config keys properly
All checks were successful
Alpine 3.20 Success

This commit is contained in:
2024-12-16 09:09:03 +01:00
parent 149938cc44
commit 32cbb15266
2 changed files with 5 additions and 3 deletions

View File

@@ -4833,7 +4833,8 @@ config_item_write_kv_pair (struct config_writer *self,
str_append_printf (self->output,
"%s# %s\n", indent, value->schema->comment);
bool can_use_word = true;
char *end = NULL;
bool can_use_word = ((void) strtoll (key, &end, 10), end == key);
for (const char *p = key; *p; p++)
if (!config_tokenizer_is_word_char (*p))
can_use_word = false;