summaryrefslogtreecommitdiff
path: root/tools/docs/lib/parse_data_structs.py
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-08-06 04:10:01 +0300
committerChuck Lever <chuck.lever@oracle.com>2025-09-22 02:24:50 +0300
commitab1c282c010c4f327bd7addc3c0035fd8e3c1721 (patch)
treecafbba7d3dfed1c92d723065eee6a4209d663b53 /tools/docs/lib/parse_data_structs.py
parent9ebcd022a34388bd3c37c6a11c1a9d49d5394eb2 (diff)
downloadlinux-ab1c282c010c4f327bd7addc3c0035fd8e3c1721.tar.xz
NFSD: Fix destination buffer size in nfsd4_ssc_setup_dul()
Commit 5304877936c0 ("NFSD: Fix strncpy() fortify warning") replaced strncpy(,, sizeof(..)) with strlcpy(,, sizeof(..) - 1), but strlcpy() already guaranteed NUL-termination of the destination buffer and subtracting one byte potentially truncated the source string. The incorrect size was then carried over in commit 72f78ae00a8e ("NFSD: move from strlcpy with unused retval to strscpy") when switching from strlcpy() to strscpy(). Fix this off-by-one error by using the full size of the destination buffer again. Cc: stable@vger.kernel.org Fixes: 5304877936c0 ("NFSD: Fix strncpy() fortify warning") Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/docs/lib/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions