aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsbm.c b/fsbm.c
index 5f7d5c1..d099640 100644
--- a/fsbm.c
+++ b/fsbm.c
@@ -130,7 +130,7 @@ skip:
printf(")\t");
// update our interface
- strcpy(interfaces[i].interface, name);
+ strncpy(interfaces[i].interface, name, len);
interfaces[i].rx_bytes = rx_bytes;
interfaces[i].timestamp = timestamp;
interfaces[i].tx_bytes = tx_bytes;
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
int c;
int interval = 10 * 100000;
- while ((c = getopt (argc, argv, "brd:hv")) != -1)
+ while ((c = getopt (argc, argv, "bd:hv")) != -1)
switch (c)
{
case 'b':