Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
bdbc45fd
Commit
bdbc45fd
authored
Sep 21, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Only copy the valid portion of the structure.
parent
915df87a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
filedlg31.c
dlls/comdlg32/filedlg31.c
+3
-2
No files found.
dlls/comdlg32/filedlg31.c
View file @
bdbc45fd
...
@@ -556,8 +556,9 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
...
@@ -556,8 +556,9 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
OPENFILENAMEW
ofnsav
;
OPENFILENAMEW
ofnsav
;
LPOPENFILENAMEW
ofnW
=
lfs
->
ofnW
;
LPOPENFILENAMEW
ofnW
=
lfs
->
ofnW
;
WCHAR
filename
[
BUFFILE
];
WCHAR
filename
[
BUFFILE
];
int
copied_size
=
min
(
ofnW
->
lStructSize
,
sizeof
(
ofnsav
)
);
ofnsav
=
*
ofnW
;
/* for later restoring */
memcpy
(
&
ofnsav
,
ofnW
,
copied_size
)
;
/* for later restoring */
/* get current file name */
/* get current file name */
if
(
path
)
if
(
path
)
...
@@ -591,7 +592,7 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
...
@@ -591,7 +592,7 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
0
,
lfs
->
lParam
);
0
,
lfs
->
lParam
);
if
(
lRet
)
if
(
lRet
)
{
{
*
ofnW
=
ofnsav
;
/* restore old state */
memcpy
(
ofnW
,
&
ofnsav
,
copied_size
)
;
/* restore old state */
return
FALSE
;
return
FALSE
;
}
}
}
}
...
...
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