From: J. Bruce Fields Date: Tue, 14 Aug 2012 21:48:39 +0000 (-0400) Subject: nfsd: allow configuring nfsd to listen on 5-digit ports X-Git-Tag: v3.7-rc1~24^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a10fded18eb275e7e97e57e7542b16c665fe61ec;p=thirdparty%2Flinux.git nfsd: allow configuring nfsd to listen on 5-digit ports Note a 16-bit value can require up to 5 digits. Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 89be13c9e769f..e41a08ffbe0a5 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -712,7 +712,7 @@ static ssize_t __write_ports_addxprt(char *buf) int port, err; struct net *net = &init_net; - if (sscanf(buf, "%15s %4u", transport, &port) != 2) + if (sscanf(buf, "%15s %5u", transport, &port) != 2) return -EINVAL; if (port < 1 || port > USHRT_MAX)