From 11b5c1f1dd821d18c7a9bdbe6b07317772aac083 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 30 Jan 2021 22:46:17 -0800 Subject: [PATCH] FRONTPANEL: Avoid theoretical potential buffer overrun --- sim_frontpanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_frontpanel.c b/sim_frontpanel.c index 0e6f116d..4599fcb0 100644 --- a/sim_frontpanel.c +++ b/sim_frontpanel.c @@ -589,7 +589,7 @@ return 0; static int _panel_establish_register_bits_collection (PANEL *panel) { -size_t i, buf_data, buf_needed = 0, reg_count = 0, bit_reg_count = 0; +size_t i, buf_data, buf_needed = 1, reg_count = 0, bit_reg_count = 0; int cmd_stat, bits_count = 0; char *buf, *response = NULL;