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.
int tos = 0;
HOST_ENTRY *cursor;
+ prog = argv[0];
+
s = open_ping_socket(ping_data_size);
if((uid = getuid())) {
perror("cannot setuid");
}
- prog = argv[0];
ident = getpid() & 0xFFFF;
verbose_flag = 1;
backoff_flag = 1;