diff mbox

[V9fs-developer] net/9p: Initialize opts->privport as it should be.

Message ID 1420805156-16555-1-git-send-email-dominique.martinet@cea.fr (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Dominique Martinet Jan. 9, 2015, 12:05 p.m. UTC
We're currently using an uninitialized value if option privport is not set,
thus (almost) always using a privileged port.

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
---
 net/9p/trans_fd.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 80d08f6..748703e 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -734,6 +734,7 @@  static int parse_opts(char *params, struct p9_fd_opts *opts)
 	opts->port = P9_PORT;
 	opts->rfd = ~0;
 	opts->wfd = ~0;
+	opts->privport = 0;
 
 	if (!params)
 		return 0;