aboutsummaryrefslogtreecommitdiffstats
path: root/utils/rtl_eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rtl_eeprom.c')
-rw-r--r--utils/rtl_eeprom.c7
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)