net/9p: Initialize opts->privport as it should be.
authorDominique Martinet <dominique.martinet@cea.fr>
Fri, 9 Jan 2015 12:05:56 +0000 (13:05 +0100)
committerEric Van Hensbergen <ericvh@gmail.com>
Sun, 22 Mar 2015 02:27:22 +0000 (19:27 -0700)
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>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/trans_fd.c

index c73b894846c17db57bc1b74440618e06e897cdcc..154479d2756d8d88487c17d3f659871fcb59d828 100644 (file)
@@ -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;