summaryrefslogtreecommitdiff
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-02-18 18:55:54 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:06:53 -0800
commit0fbc074e6ff1393c43245bae78bd367173be4903 (patch)
tree3b7325f004606c0beaff8dcb91c019b66165221f /kernel/resource.c
parent68d3584b90b4388de64607bb1d35fce2293ce334 (diff)
sunrpc/cache: fix off-by-one in qword_get()
commit b7052cd7bcf3c1478796e93e3dff2b44c9e82943 upstream. The qword_get() function NUL-terminates its output buffer. If the input string is in hex format \xXXXX... and the same length as the output buffer, there is an off-by-one: int qword_get(char **bpp, char *dest, int bufsize) { ... while (len < bufsize) { ... *dest++ = (h << 4) | l; len++; } ... *dest = '\0'; return len; } This patch ensures the NUL terminator doesn't fall outside the output buffer. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/resource.c')
0 files changed, 0 insertions, 0 deletions