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
c8e8f441
Commit
c8e8f441
authored
Jan 24, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use the column count specified in the table transform data.
It can be smaller than the number of columns found in the table meta data.
parent
483ae58e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
table.c
dlls/msi/table.c
+13
-14
No files found.
dlls/msi/table.c
View file @
c8e8f441
...
...
@@ -2501,14 +2501,12 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
string_table
*
st
,
TRANSFORMDATA
*
transform
,
UINT
bytes_per_strref
)
{
UINT
rawsize
=
0
;
BYTE
*
rawdata
=
NULL
;
MSITABLEVIEW
*
tv
=
NULL
;
UINT
r
,
n
,
sz
,
i
,
mask
;
UINT
r
,
n
,
sz
,
i
,
mask
,
num_cols
,
colcol
=
0
,
rawsize
=
0
;
MSIRECORD
*
rec
=
NULL
;
UINT
colcol
=
0
;
WCHAR
coltable
[
32
];
LPWSTR
name
;
const
WCHAR
*
name
;
if
(
!
transform
)
return
ERROR_SUCCESS
;
...
...
@@ -2539,18 +2537,18 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
debugstr_w
(
name
),
tv
->
num_cols
,
tv
->
row_size
,
rawsize
);
/* interpret the data */
for
(
n
=
0
;
n
<
rawsize
;
)
for
(
n
=
0
;
n
<
rawsize
;
)
{
mask
=
rawdata
[
n
]
|
(
rawdata
[
n
+
1
]
<<
8
);
if
(
mask
&
1
)
mask
=
rawdata
[
n
]
|
(
rawdata
[
n
+
1
]
<<
8
);
if
(
mask
&
1
)
{
/*
* if the low bit is set, columns are continuous and
* the number of columns is specified in the high byte
*/
sz
=
2
;
for
(
i
=
0
;
i
<
tv
->
num_cols
;
i
++
)
num_cols
=
mask
>>
8
;
for
(
i
=
0
;
i
<
num_cols
;
i
++
)
{
if
(
(
tv
->
columns
[
i
].
type
&
MSITYPE_STRING
)
&&
!
MSITYPE_IS_BINARY
(
tv
->
columns
[
i
].
type
)
)
...
...
@@ -2570,12 +2568,13 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
* and it means that this row should be deleted.
*/
sz
=
2
;
for
(
i
=
0
;
i
<
tv
->
num_cols
;
i
++
)
num_cols
=
tv
->
num_cols
;
for
(
i
=
0
;
i
<
num_cols
;
i
++
)
{
if
(
(
tv
->
columns
[
i
].
type
&
MSITYPE_KEY
)
||
((
1
<<
i
)
&
mask
))
if
((
tv
->
columns
[
i
].
type
&
MSITYPE_KEY
)
||
((
1
<<
i
)
&
mask
))
{
if
(
(
tv
->
columns
[
i
].
type
&
MSITYPE_STRING
)
&&
!
MSITYPE_IS_BINARY
(
tv
->
columns
[
i
].
type
)
)
if
(
(
tv
->
columns
[
i
].
type
&
MSITYPE_STRING
)
&&
!
MSITYPE_IS_BINARY
(
tv
->
columns
[
i
].
type
)
)
sz
+=
bytes_per_strref
;
else
sz
+=
bytes_per_column
(
tv
->
db
,
&
tv
->
columns
[
i
],
bytes_per_strref
);
...
...
@@ -2584,7 +2583,7 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
}
/* check we didn't run of the end of the table */
if
(
(
n
+
sz
)
>
rawsize
)
if
(
n
+
sz
>
rawsize
)
{
ERR
(
"borked.
\n
"
);
dump_table
(
st
,
(
USHORT
*
)
rawdata
,
rawsize
);
...
...
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