summaryrefslogtreecommitdiffstats
path: root/src/VBox/Additions/linux/sharedfolders/utils.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:52 +0000
commitcd47c2446f1a9dee96610f298989848f8986a8be (patch)
tree02c30d62a9164987d0aaba2f72c58a50053205d6 /src/VBox/Additions/linux/sharedfolders/utils.c
parentReleasing progress-linux version 7.0.14-dfsg-4~progress7.99u1. (diff)
downloadvirtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.tar.xz
virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.zip
Merging upstream version 7.0.16-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Additions/linux/sharedfolders/utils.c')
-rw-r--r--src/VBox/Additions/linux/sharedfolders/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c b/src/VBox/Additions/linux/sharedfolders/utils.c
index b75997a8..7c1fba95 100644
--- a/src/VBox/Additions/linux/sharedfolders/utils.c
+++ b/src/VBox/Additions/linux/sharedfolders/utils.c
@@ -190,10 +190,11 @@ int vbsf_nls_to_shflstring(struct vbsf_super_info *pSuperInfo, const char *pszNl
if (cchNls + 1 < _64K) {
pString = (PSHFLSTRING)kmalloc(SHFLSTRING_HEADER_SIZE + cchNls + 1, GFP_KERNEL);
if (pString) {
+ char *pchDst = pString->String.ach;
pString->u16Length = (uint16_t)cchNls;
pString->u16Size = (uint16_t)(cchNls + 1);
- RT_BCOPY_UNFORTIFIED(pString->String.ach, pszNls, cchNls);
- pString->String.ach[cchNls] = '\0';
+ RT_BCOPY_UNFORTIFIED(pchDst, pszNls, cchNls);
+ pchDst[cchNls] = '\0';
rc = 0;
} else {
Log(("vbsf_nls_to_shflstring: failed to allocate %u bytes\n", SHFLSTRING_HEADER_SIZE + cchNls + 1));