mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
port-mirroring: Fix compilation with GCC8
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- 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)
|
||||
{
|
||||
Reference in New Issue
Block a user