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
fb6bd241
Commit
fb6bd241
authored
Jul 20, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Jul 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't use fixed-size buffers in AppSearch action.
parent
951f4657
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
46 deletions
+18
-46
appsearch.c
dlls/msi/appsearch.c
+18
-46
No files found.
dlls/msi/appsearch.c
View file @
fb6bd241
...
...
@@ -872,9 +872,8 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue,
if
(
rc
==
ERROR_SUCCESS
)
{
MSIRECORD
*
row
=
0
;
WCHAR
buffer
[
MAX_PATH
],
expanded
[
MAX_PATH
];
LPWSTR
path
=
NULL
,
parent
=
NULL
;
DWORD
sz
;
WCHAR
expanded
[
MAX_PATH
];
LPWSTR
parentName
=
NULL
,
path
=
NULL
,
parent
=
NULL
;
int
depth
;
rc
=
MSI_ViewExecute
(
view
,
0
);
...
...
@@ -892,36 +891,25 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue,
}
/* check whether parent is set */
buffer
[
0
]
=
0
;
sz
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]);
rc
=
MSI_RecordGetStringW
(
row
,
2
,
buffer
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
{
ERR
(
"Error is %x
\n
"
,
rc
);
goto
end
;
}
else
if
(
buffer
[
0
])
parentName
=
msi_dup_record_field
(
row
,
2
);
if
(
parentName
)
{
MSISIGNATURE
parentSig
;
rc
=
ACTION_AppSearchSigName
(
package
,
buffer
,
&
parentSig
,
&
parent
);
rc
=
ACTION_AppSearchSigName
(
package
,
parentName
,
&
parentSig
,
&
parent
);
ACTION_FreeSignature
(
&
parentSig
);
msi_free
(
parentName
);
}
/* now look for path */
buffer
[
0
]
=
0
;
sz
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]);
rc
=
MSI_RecordGetStringW
(
row
,
3
,
buffer
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
{
ERR
(
"Error is %x
\n
"
,
rc
);
goto
end
;
}
path
=
msi_dup_record_field
(
row
,
3
);
if
(
MSI_RecordIsNull
(
row
,
4
))
depth
=
0
;
else
depth
=
MSI_RecordGetInteger
(
row
,
4
);
ACTION_ExpandAnyPath
(
package
,
buffer
,
expanded
,
ACTION_ExpandAnyPath
(
package
,
path
,
expanded
,
sizeof
(
expanded
)
/
sizeof
(
expanded
[
0
]));
msi_free
(
path
);
if
(
parent
)
{
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlenW
(
parent
)
+
...
...
@@ -994,8 +982,7 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
if
(
rc
==
ERROR_SUCCESS
)
{
MSIRECORD
*
row
=
0
;
WCHAR
propBuf
[
0x100
],
sigBuf
[
0x100
];
DWORD
sz
;
LPWSTR
propName
,
sigName
;
rc
=
MSI_ViewExecute
(
view
,
0
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
@@ -1014,36 +1001,21 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
}
/* get property and signature */
propBuf
[
0
]
=
0
;
sz
=
sizeof
(
propBuf
)
/
sizeof
(
propBuf
[
0
]);
rc
=
MSI_RecordGetStringW
(
row
,
1
,
propBuf
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
{
ERR
(
"Error is %x
\n
"
,
rc
);
msiobj_release
(
&
row
->
hdr
);
break
;
}
sigBuf
[
0
]
=
0
;
sz
=
sizeof
(
sigBuf
)
/
sizeof
(
sigBuf
[
0
]);
rc
=
MSI_RecordGetStringW
(
row
,
2
,
sigBuf
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
{
ERR
(
"Error is %x
\n
"
,
rc
);
msiobj_release
(
&
row
->
hdr
);
break
;
}
propName
=
msi_dup_record_field
(
row
,
1
);
sigName
=
msi_dup_record_field
(
row
,
2
);
TRACE
(
"Searching for Property %s, Signature_ %s
\n
"
,
debugstr_w
(
prop
Buf
),
debugstr_w
(
sigBuf
));
debugstr_w
(
prop
Name
),
debugstr_w
(
sigName
));
rc
=
ACTION_AppSearchSigName
(
package
,
sig
Buf
,
&
sig
,
&
value
);
rc
=
ACTION_AppSearchSigName
(
package
,
sig
Name
,
&
sig
,
&
value
);
if
(
value
)
{
MSI_SetPropertyW
(
package
,
prop
Buf
,
value
);
MSI_SetPropertyW
(
package
,
prop
Name
,
value
);
msi_free
(
value
);
}
ACTION_FreeSignature
(
&
sig
);
msi_free
(
propName
);
msi_free
(
sigName
);
msiobj_release
(
&
row
->
hdr
);
}
...
...
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