From 2542a28e643cea9bad8213de453aafe98ee6bd6e Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 29 Aug 2023 21:14:26 -0500 Subject: [PATCH] config: Disable editor by default if config b2sum present. Fixes #296 --- common/lib/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/lib/config.c b/common/lib/config.c index cdfa2e0f..5821e83d 100644 --- a/common/lib/config.c +++ b/common/lib/config.c @@ -147,6 +147,8 @@ int init_config(size_t config_size) { config_b2sum += sizeof(CONFIG_B2SUM_SIGNATURE) - 1; if (memcmp((void *)config_b2sum, CONFIG_B2SUM_EMPTY, 128) != 0) { + editor_enabled = false; + uint8_t out_buf[BLAKE2B_OUT_BYTES]; blake2b(out_buf, config_addr, config_size - 2); uint8_t hash_buf[BLAKE2B_OUT_BYTES];