rexec(3): prevent uninitialized access to "port" variable.
CID: 1018716 (and clang static checker)
This commit is contained in:
parent
b5f65ef867
commit
23ff0c84ba
@ -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