rexec(3): prevent uninitialized access to "port" variable.
CID: 1018716 (and clang static checker)
This commit is contained in:
parent
3122da88ca
commit
46bf2f5317
@ -332,10 +332,10 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
|
||||
perror(hp->h_name);
|
||||
return (-1);
|
||||
}
|
||||
if (fd2p == 0) {
|
||||
(void) write(s, "", 1);
|
||||
port = 0;
|
||||
} else {
|
||||
port = 0;
|
||||
if (fd2p == 0)
|
||||
(void) write(s, "", 1);
|
||||
else {
|
||||
char num[8];
|
||||
int s2, sin2len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user