From d002fde67e5c50306f7d8833a468bb5537d78d4f Mon Sep 17 00:00:00 2001 From: Joshua Henderson Date: Thu, 12 May 2022 00:31:07 -0400 Subject: [PATCH] AP_Param: eedump_apparam fix accessing uninit var --- libraries/AP_Param/tools/eedump_apparam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Param/tools/eedump_apparam.c b/libraries/AP_Param/tools/eedump_apparam.c index 709a37296b..88a88968f7 100644 --- a/libraries/AP_Param/tools/eedump_apparam.c +++ b/libraries/AP_Param/tools/eedump_apparam.c @@ -119,8 +119,8 @@ main(int argc, char *argv[]) index = sizeof(*header); for (;; ) { uint8_t size; - const uint16_t key = ((uint16_t)var->key_high)<<8 | var->key_low; var = (struct Param_header *)&eeprom[index]; + const uint16_t key = ((uint16_t)var->key_high)<<8 | var->key_low; if (key == _sentinal_key || var->type == _sentinal_type) { printf("end sentinel at %u\n", index);