]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.3/nfsd4-fix-xdr4-inclusion-of-escaped-char.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 3.18.3 / nfsd4-fix-xdr4-inclusion-of-escaped-char.patch
CommitLineData
9b291425
GKH
1From 5a64e56976f1ba98743e1678c0029a98e9034c81 Mon Sep 17 00:00:00 2001
2From: Benjamin Coddington <bcodding@redhat.com>
3Date: Sun, 7 Dec 2014 16:05:47 -0500
4Subject: nfsd4: fix xdr4 inclusion of escaped char
5
6From: Benjamin Coddington <bcodding@redhat.com>
7
8commit 5a64e56976f1ba98743e1678c0029a98e9034c81 upstream.
9
10Fix a bug where nfsd4_encode_components_esc() includes the esc_end char as
11an additional string encoding.
12
13Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
14Fixes: e7a0444aef4a "nfsd: add IPv6 addr escaping to fs_location hosts"
15Signed-off-by: J. Bruce Fields <bfields@redhat.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18---
19 fs/nfsd/nfs4xdr.c | 3 +++
20 1 file changed, 3 insertions(+)
21
22--- a/fs/nfsd/nfs4xdr.c
23+++ b/fs/nfsd/nfs4xdr.c
24@@ -1795,6 +1795,9 @@ static __be32 nfsd4_encode_components_es
25 }
26 else
27 end++;
28+ if (found_esc)
29+ end = next;
30+
31 str = end;
32 }
33 pathlen = htonl(xdr->buf->len - pathlen_offset);