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
ffc251f5
Commit
ffc251f5
authored
Feb 04, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Return ERROR_MORE_DATA if the size is too small.
parent
dc8f714a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
msi.c
dlls/msi/msi.c
+8
-0
msi.c
dlls/msi/tests/msi.c
+2
-8
No files found.
dlls/msi/msi.c
View file @
ffc251f5
...
...
@@ -1621,6 +1621,10 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf,
HIWORD
(
ffi
->
dwFileVersionMS
),
LOWORD
(
ffi
->
dwFileVersionMS
),
HIWORD
(
ffi
->
dwFileVersionLS
),
LOWORD
(
ffi
->
dwFileVersionLS
));
if
(
lpVersionBuf
)
lstrcpynW
(
lpVersionBuf
,
tmp
,
*
pcchVersionBuf
);
if
(
lstrlenW
(
tmp
)
>=
*
pcchVersionBuf
)
ret
=
ERROR_MORE_DATA
;
*
pcchVersionBuf
=
lstrlenW
(
tmp
);
}
else
...
...
@@ -1637,6 +1641,10 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf,
FIXME
(
"Retrieve language from file
\n
"
);
wsprintfW
(
tmp
,
szLangFormat
,
lang
);
if
(
lpLangBuf
)
lstrcpynW
(
lpLangBuf
,
tmp
,
*
pcchLangBuf
);
if
(
lstrlenW
(
tmp
)
>=
*
pcchLangBuf
)
ret
=
ERROR_MORE_DATA
;
*
pcchLangBuf
=
lstrlenW
(
tmp
);
}
...
...
dlls/msi/tests/msi.c
View file @
ffc251f5
...
...
@@ -2024,25 +2024,19 @@ static void test_MsiGetFileVersion(void)
versz
=
5
;
lstrcpyA
(
version
,
"version"
);
r
=
MsiGetFileVersionA
(
path
,
version
,
&
versz
,
NULL
,
NULL
);
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
ok
(
!
strncmp
(
version
,
vercheck
,
4
),
"Expected first 4 characters of %s, got %s
\n
"
,
vercheck
,
version
);
ok
(
versz
==
verchecksz
,
"Expected %d, got %d
\n
"
,
verchecksz
,
versz
);
todo_wine
{
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
}
/* pcchLangBuf not big enough */
langsz
=
3
;
lstrcpyA
(
lang
,
"lang"
);
r
=
MsiGetFileVersionA
(
path
,
NULL
,
NULL
,
lang
,
&
langsz
);
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
ok
(
!
strncmp
(
lang
,
langcheck
,
2
),
"Expected first character of %s, got %s
\n
"
,
langcheck
,
lang
);
ok
(
langsz
==
langchecksz
,
"Expected %d, got %d
\n
"
,
langchecksz
,
langsz
);
todo_wine
{
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
}
HeapFree
(
GetProcessHeap
(),
0
,
vercheck
);
HeapFree
(
GetProcessHeap
(),
0
,
langcheck
);
...
...
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