Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4a7b5856
Commit
4a7b5856
authored
Mar 23, 2015
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Allow typelib filenames longer than MAX_PATH.
parent
5e5adcff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
typelib.c
dlls/oleaut32/typelib.c
+16
-7
No files found.
dlls/oleaut32/typelib.c
View file @
4a7b5856
...
...
@@ -3353,18 +3353,27 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
h
=
CreateFileW
(
pszPath
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
!=
INVALID_HANDLE_VALUE
){
FILE_NAME_INFORMATION
*
info
;
char
data
[
MAX_PATH
*
sizeof
(
WCHAR
)
+
sizeof
(
info
->
FileNameLength
)];
FILE_NAME_INFORMATION
size_info
;
BOOL
br
;
info
=
(
FILE_NAME_INFORMATION
*
)
data
;
/* GetFileInformationByHandleEx returns the path of the file without
* WOW64 redirection */
br
=
GetFileInformationByHandleEx
(
h
,
FileNameInfo
,
data
,
sizeof
(
data
));
if
(
br
){
info
->
FileName
[
info
->
FileNameLength
/
sizeof
(
WCHAR
)]
=
0
;
lstrcpynW
(
pszPath
+
2
,
info
->
FileName
,
cchPath
-
2
);
br
=
GetFileInformationByHandleEx
(
h
,
FileNameInfo
,
&
size_info
,
sizeof
(
size_info
));
if
(
br
||
GetLastError
()
==
ERROR_MORE_DATA
){
FILE_NAME_INFORMATION
*
info
;
DWORD
size
=
sizeof
(
*
info
)
+
size_info
.
FileNameLength
+
sizeof
(
WCHAR
);
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
br
=
GetFileInformationByHandleEx
(
h
,
FileNameInfo
,
info
,
size
);
if
(
br
){
info
->
FileName
[
info
->
FileNameLength
/
sizeof
(
WCHAR
)]
=
0
;
lstrcpynW
(
pszPath
+
2
,
info
->
FileName
,
cchPath
-
2
);
}
HeapFree
(
GetProcessHeap
(),
0
,
info
);
}
CloseHandle
(
h
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment