From 57e4ae6e25ad6c01cca6dfad4c50764a7a9f446c 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];