diff options
author | ZoRo <dos21h@gmail.com> | 2022-02-18 20:33:58 +0000 |
---|---|---|
committer | ZoRo <dos21h@gmail.com> | 2022-02-18 20:33:58 +0000 |
commit | d696ea3a6d640cd96a1ba2ac39bdc51d7f884e1d (patch) | |
tree | 0f10ba2174be3335d75b63975b2b2c0795a8aa2a /utils/rtl_eeprom.c | |
parent | f8b84cf48099fb020b1174c8cc6195dde42308c3 (diff) | |
download | r820t-d696ea3a6d640cd96a1ba2ac39bdc51d7f884e1d.tar.gz r820t-d696ea3a6d640cd96a1ba2ac39bdc51d7f884e1d.zip |
Update to latest
Diffstat (limited to 'utils/rtl_eeprom.c')
-rw-r--r-- | utils/rtl_eeprom.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) |