From d696ea3a6d640cd96a1ba2ac39bdc51d7f884e1d Mon Sep 17 00:00:00 2001 From: ZoRo Date: Fri, 18 Feb 2022 20:33:58 +0000 Subject: Update to latest --- utils/rtl_eeprom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils/rtl_eeprom.c') diff --git a/utils/rtl_eeprom.c b/utils/rtl_eeprom.c index 5259820..24be900 100644 --- a/utils/rtl_eeprom.c +++ b/utils/rtl_eeprom.c @@ -303,6 +303,7 @@ int main(int argc, char **argv) case 'w': flash_file = 1; change = 1; + /* fall-through */ case 'r': filename = optarg; break; @@ -369,14 +370,14 @@ int main(int argc, char **argv) } if (manuf_str) - strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE); + strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE - 1); if (product_str) - strncpy((char*)&conf.product, product_str, MAX_STR_SIZE); + strncpy((char*)&conf.product, product_str, MAX_STR_SIZE - 1); if (serial_str) { conf.have_serial = 1; - strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE); + strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE - 1); } if (ir_endpoint != 0) -- cgit v1.2.3