Stefan Hajnoczi
dc16b4393f
sunrpc/cache: fix off-by-one in qword_get()
...
commit b7052cd7bc 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 >
2016-03-03 15:07:29 -08:00
..
2015-10-21 00:49:25 +02:00
2015-10-28 12:32:48 -04:00
2015-03-02 16:43:41 -05:00
2015-11-17 14:38:35 -05:00
2015-05-11 10:50:17 -04:00
2015-09-17 22:13:32 -07:00
2015-12-14 16:09:30 -05:00
2016-01-31 11:29:02 -08:00
2016-03-03 15:07:16 -08:00
2016-03-03 15:07:04 -08:00
2015-12-01 15:45:05 -05:00
2015-10-13 17:42:34 +02:00
2016-03-03 15:07:26 -08:00
2016-03-03 15:07:07 -08:00
2015-10-09 07:52:27 -07:00
2016-03-03 15:07:07 -08:00
2015-12-14 16:09:30 -05:00
2015-11-18 16:27:46 -05:00
2015-11-01 15:56:11 -05:00
2015-09-28 22:51:15 -07:00
2015-11-23 14:56:15 -05:00
2015-11-02 22:47:14 -05:00
2016-03-03 15:07:07 -08:00
2016-03-03 15:07:07 -08:00
2015-05-11 10:50:17 -04:00
2015-12-14 16:09:30 -05:00
2016-03-03 15:07:03 -08:00
2015-10-23 03:05:19 -07:00
2016-03-03 15:07:07 -08:00
2015-10-07 04:27:43 -07:00
2014-10-24 15:51:42 -04:00
2015-07-27 01:06:53 -07:00
2016-03-03 15:07:26 -08:00
2015-10-21 00:49:24 +02:00
2015-12-12 00:43:44 -05:00
2015-12-18 14:45:45 +01:00
2015-03-31 13:58:35 -04:00
2015-11-06 17:50:42 -08:00
2015-06-18 21:14:32 +02:00
2015-12-01 15:45:05 -05:00
2016-03-03 15:07:04 -08:00
2015-11-29 22:17:17 -05:00
2016-01-31 11:29:00 -08:00
2015-11-24 17:20:09 -05:00
2016-03-03 15:07:26 -08:00
2015-06-24 02:58:51 -07:00
2015-12-01 15:45:05 -05:00
2016-03-03 15:07:07 -08:00
2016-03-03 15:07:07 -08:00
2016-03-03 15:07:29 -08:00
2016-03-03 15:07:04 -08:00
2016-03-03 15:07:07 -08:00
2016-03-03 15:07:07 -08:00
2015-11-04 22:03:10 -05:00
2015-08-09 22:43:52 -07:00
2015-12-15 13:11:26 +01:00
2015-05-11 10:50:17 -04:00
2016-01-31 11:29:00 -08:00
2015-04-09 00:02:26 -04:00
2015-09-29 20:40:32 -07:00
2015-09-29 20:40:32 -07:00
2015-12-30 16:38:01 -05:00
2015-10-23 06:22:08 -07:00