From 1ce3c672e49dba730b528aa346bb522c0150567c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:47:04 +0200 Subject: Adding upstream version 7.0.18-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/Additions/linux/sharedfolders/dirops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/VBox/Additions/linux/sharedfolders/dirops.c') 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; -- cgit v1.2.3