diff options
author | Fedor Tokarev <ftokarev@gmail.com> | 2020-03-28 14:56:55 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-05-27 10:08:26 -0400 |
commit | 118917d696dc59fd3e1741012c2f9db2294bed6f (patch) | |
tree | eaa2fe131df0726d0cd0c0c94387d75ded15849f /net/sunrpc/auth_null.c | |
parent | 00a7a00e2d2fc2ebbaf2c3ef25427ae13e0f94da (diff) | |
download | lwn-118917d696dc59fd3e1741012c2f9db2294bed6f.tar.gz lwn-118917d696dc59fd3e1741012c2f9db2294bed6f.zip |
net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
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>
Diffstat (limited to 'net/sunrpc/auth_null.c')
0 files changed, 0 insertions, 0 deletions