On Thu, 27 Aug 2015 15:47:18 +0200, Alexander Bluhm wrote: > When syslogd is reloading a modified config, it does a reexec on > itself. For this it uses the original arguments of main(). The > function loghost_parse() modifies the optarg memory it is operating > on. To prevent that the exec arguments have been tampered, pass a > copy of optarg to loghost_parse().
If you are going to do it this way you really need to check the strlcpy() return value and error out on overflow. - todd