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

  1. --- a/src/main.c
  2. +++ b/src/main.c
  3. @@ -90,7 +90,7 @@ int loadCfg(const char *fpath)
  4. }
  5. else
  6. {
  7. - snprintf(cfg.dst_if, IFNAMSIZ, "%s", value);
  8. + strncpy(cfg.dst_if, value, IFNAMSIZ);
  9. cfg.flags |= PM_DST_IF;
  10. }
  11. }
  12. @@ -104,7 +104,7 @@ int loadCfg(const char *fpath)
  13. }
  14. else if (strcmp(option, "filter") == 0)
  15. {
  16. - snprintf(cfg.pfe, PFE_MAX, "%s", value);
  17. + strncpy(cfg.pfe, value, PFE_MAX);
  18. }
  19. else if (strcmp(option, "promiscuous") == 0)
  20. {