diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-23 00:28:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-03 12:02:36 -0700 |
commit | fa82051f97c1e81e44ae1517a4303db6ceba1e2b (patch) | |
tree | 7577b51903b553991dba123d3d21f21e0bf90338 /kernel/gcov/gcov.h | |
parent | abfabd98494dcba8cefe726a28c006be87b34d0c (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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/gcov/gcov.h')
0 files changed, 0 insertions, 0 deletions