[Git][wine/wine][master] 6 commits: scrrun: Fix BSTR length off-by-one in create_folder.
Alexandre Julliard pushed to branch master at wine / wine Commits: 8d1c0797 by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Fix BSTR length off-by-one in create_folder. GetFullPathNameW returns the required buffer size including the terminating NUL character, but the result was passed directly to SysAllocStringLen, which expects the string length excluding the NUL. As a result, the BSTR stored in struct folder's path field had a length prefix one greater than the actual string content. The bug was not observable via folder_get_Path or folder_get_Name because both use the NUL-terminated view of the buffer, but it misdirects any internal code that uses SysStringLen on the stored path. - - - - - e6bf11d5 by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Implement IFolder::get_ParentFolder. Return a new IFolder for the parent directory of This->path, reusing the existing get_parent_folder_name() helper. Return a NULL IFolder (Nothing in VBScript) for root paths. This fixes VBScript expressions such as `folder.ParentFolder & "\sub"` that previously failed with error 445 ("Object doesn't support this action") because the getter was a stub returning E_NOTIMPL. - - - - - b32ee8a7 by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Implement IFile::get_ParentFolder. Return a new IFolder for the parent directory of This->path, mirroring the IFolder::get_ParentFolder implementation. The struct file path is a plain WCHAR* (not a BSTR), so the string length is taken via lstrlenW. - - - - - 2fe78d7b by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Implement IFolder::get_IsRootFolder. Return VARIANT_TRUE when the folder has no parent (its path is a drive root), and VARIANT_FALSE otherwise, using the existing get_parent_folder_name() helper. - - - - - 1d7a075a by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Implement IFolder::get_Attributes and IFolder::put_Attributes. Delegate to GetFileAttributesW and SetFileAttributesW, mirroring the existing IFile implementations of these methods. The returned value is masked to the same FileAttribute subset that IFile::get_Attributes exposes. - - - - - b8bb2a37 by Francis De Brabandere at 2026-04-15T17:11:24+02:00 scrrun: Implement IFolder and IFile date getters. Implement IFolder::get_DateCreated, IFolder::get_DateLastModified, IFolder::get_DateLastAccessed, and the previously-stubbed IFile::get_DateLastAccessed, all delegating to GetFileAttributesExW and the existing get_date_from_filetime helper. - - - - - 2 changed files: - dlls/scrrun/filesystem.c - dlls/scrrun/tests/filesystem.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/a55f8c7668e4dcc7400a4d8e0bfe15... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/a55f8c7668e4dcc7400a4d8e0bfe15... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)