diff options
| author | Fedor Tokarev <ftokarev@gmail.com> | 2020-03-28 14:56:55 +0300 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2020-06-29 20:07:53 -0400 |
| commit | c90c6ac8fbe9d7b93357fd433d606cf510001bc8 (patch) | |
| tree | ccf8ab6a03d3496051525f332d8f724056aafcce /include/linux/debugobjects.h | |
| parent | 4e26dd5e3f6746efbc681824360e680b02b76174 (diff) | |
net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
[ Upstream commit 118917d696dc59fd3e1741012c2f9db2294bed6f ]
Fix off-by-one issues in 'rpc_ntop6':
- 'snprintf' returns the number of characters which would have been
written if enough space had been available, excluding the terminating
null byte. Thus, a return value of 'sizeof(scopebuf)' means that the
last character was dropped.
- 'strcat' adds a terminating null byte to the string, thus if len ==
buflen, the null byte is written past the end of the buffer.
Signed-off-by: Fedor Tokarev <ftokarev@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
