Author: pfg
Date: Mon Feb 16 21:35:29 2015
New Revision: 278867
URL: https://svnweb.freebsd.org/changeset/base/278867
Log:
rexec(3): prevent uninitialized access to "port" variable.
CID: 1018716 (and clang static checker)
Modified:
head/lib/libcompat/4.3/rexec.c
Modified: head/lib/libcompat/4.3/rexec.c
==============================================================================
--- head/lib/libcompat/4.3/rexec.c Mon Feb 16 21:26:16 2015
(r278866)
+++ head/lib/libcompat/4.3/rexec.c Mon Feb 16 21:35:29 2015
(r278867)
@@ -332,10 +332,10 @@ retry:
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;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"