]> git.gsnw.org Git - fping.git/commit
Set the variable "prog" before the first call to any routine using error reporting
authorPeter Bray <illumino@github>
Sat, 19 Nov 2016 13:01:59 +0000 (00:01 +1100)
committerPeter Bray <illumino@github>
Sat, 19 Nov 2016 13:01:59 +0000 (00:01 +1100)
commit1400fc29a571bfdf181b2000afd0347a27a54b9c
tree79e45457152e939d30f3cf4dde63b642fbff7069
parent79ba8c9ae7253b419befcfd8a5715e904c10677e
Set the variable "prog" before the first call to any routine using error reporting

Error reporting uses the variable "prog" which is null prior to obtaining a
reference to argv[0]. The call to open_ping_socket() uses this on an error,
such as the executable not being SUID or otherwise privileged invocation.
Solaris 10 printf(3C) of "%s" on a null pointer causes a core dump.
src/fping.c