You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
678 B

--- a/src/main.c
+++ b/src/main.c
@@ -90,7 +90,7 @@ int loadCfg(const char *fpath)
}
else
{
- snprintf(cfg.dst_if, IFNAMSIZ, "%s", value);
+ strncpy(cfg.dst_if, value, IFNAMSIZ);
cfg.flags |= PM_DST_IF;
}
}
@@ -104,7 +104,7 @@ int loadCfg(const char *fpath)
}
else if (strcmp(option, "filter") == 0)
{
- snprintf(cfg.pfe, PFE_MAX, "%s", value);
+ strncpy(cfg.pfe, value, PFE_MAX);
}
else if (strcmp(option, "promiscuous") == 0)
{