diff options
author | njl <njl@FreeBSD.org> | 2005-03-11 23:35:23 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-03-11 23:35:23 +0000 |
commit | f5d07b2dc96107e49b722f82a96202e04b58fdc6 (patch) | |
tree | 75aabd3002409ea7ac760a5d13a3ab0dd039cecb /sys/fs/msdosfs | |
parent | a08e532eaa2231786c6ff27b7aeb2a2a33d99601 (diff) | |
download | FreeBSD-src-f5d07b2dc96107e49b722f82a96202e04b58fdc6.zip FreeBSD-src-f5d07b2dc96107e49b722f82a96202e04b58fdc6.tar.gz |
Correct a last-minute thinko. Instead of copying the nul with the string,
nul-terminate the dp->d_name directly and only copy the string.
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_conv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c index efd2191..8c2d5f4 100644 --- a/sys/fs/msdosfs/msdosfs_conv.c +++ b/sys/fs/msdosfs/msdosfs_conv.c @@ -1249,8 +1249,8 @@ mbnambuf_flush(struct dirent *dp) mbnambuf_init(); return (NULL); } - nambuf_ptr[nambuf_len] = '\0'; memcpy(dp->d_name, nambuf_ptr, nambuf_len); + dp->d_name[nambuf_len] = '\0'; dp->d_namlen = nambuf_len; mbnambuf_init(); |