diff options
Diffstat (limited to 'src/VBox/Additions/linux/sharedfolders/dirops.c')
-rw-r--r-- | src/VBox/Additions/linux/sharedfolders/dirops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/VBox/Additions/linux/sharedfolders/dirops.c b/src/VBox/Additions/linux/sharedfolders/dirops.c index fb8c8d59..2ff10bb0 100644 --- a/src/VBox/Additions/linux/sharedfolders/dirops.c +++ b/src/VBox/Additions/linux/sharedfolders/dirops.c @@ -486,13 +486,14 @@ static int vbsf_dir_read(struct file *dir, void *opaque, filldir_t filldir) uintptr_t const offEntryInBuf = (uintptr_t)pEntry - (uintptr_t)pBuf; uint16_t cbSrcName; uint16_t cchSrcName; + char *pszSrcName = pEntry->name.String.ach; AssertLogRelMsgBreak(offEntryInBuf + RT_UOFFSETOF(SHFLDIRINFO, name.String) <= cbValid, ("%#llx + %#x vs %#x\n", offEntryInBuf, RT_UOFFSETOF(SHFLDIRINFO, name.String), cbValid)); cbSrcName = pEntry->name.u16Size; cchSrcName = pEntry->name.u16Length; AssertLogRelBreak(offEntryInBuf + RT_UOFFSETOF(SHFLDIRINFO, name.String) + cbSrcName <= cbValid); AssertLogRelBreak(cchSrcName < cbSrcName); - AssertLogRelBreak(pEntry->name.String.ach[cchSrcName] == '\0'); + AssertLogRelBreak(pszSrcName[cchSrcName] == '\0'); /* * Filter out '.' and '..' entires. @@ -500,7 +501,7 @@ static int vbsf_dir_read(struct file *dir, void *opaque, filldir_t filldir) if ( cchSrcName > 2 || pEntry->name.String.ach[0] != '.' || ( cchSrcName == 2 - && pEntry->name.String.ach[1] != '.')) { + && pszSrcName[1] != '.')) { int const d_type = vbsf_get_d_type(pEntry->Info.Attr.fMode); ino_t const d_ino = (ino_t)offPos + 0xbeef; /* very fake */ bool fContinue; |