diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-23 00:28:40 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-04-03 10:32:29 +0200 |
commit | a41fd7536d9cbc81cf02033c3efa4078431fa4d0 (patch) | |
tree | 24c826b660b08f78a65b20ec46b807a26b9f849e /fs/9p/xattr_trusted.c | |
parent | 2c611dc0ca77c8012fee6f33cf05040b16dbee38 (diff) |
make prepend_name() work correctly when called with negative *buflen
commit e825196d48d2b89a6ec3a8eff280098d2a78207e upstream.
In all callchains leading to prepend_name(), the value left in *buflen
is eventually discarded unused if prepend_name() has returned a negative.
So we are free to do what prepend() does, and subtract from *buflen
*before* checking for underflow (which turns into checking the sign
of subtraction result, of course).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/9p/xattr_trusted.c')
0 files changed, 0 insertions, 0 deletions