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
1f09af30
Commit
1f09af30
authored
Sep 09, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move a fixed size buffer to the heap.
parent
f11c8b00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
action.h
dlls/msi/action.h
+1
-1
classes.c
dlls/msi/classes.c
+13
-10
helpers.c
dlls/msi/helpers.c
+1
-1
No files found.
dlls/msi/action.h
View file @
1f09af30
...
...
@@ -166,7 +166,7 @@ typedef struct tagMSIMIME MSIMIME;
typedef
struct
tagMSIEXTENSION
{
struct
list
entry
;
WCHAR
Extension
[
256
]
;
/* Primary Key */
LPWSTR
Extension
;
/* Primary Key */
MSICOMPONENT
*
Component
;
MSIPROGID
*
ProgID
;
LPWSTR
ProgIDText
;
...
...
dlls/msi/classes.c
View file @
1f09af30
...
...
@@ -427,7 +427,6 @@ static MSIMIME *load_given_mime( MSIPACKAGE *package, LPCWSTR mime )
static
MSIEXTENSION
*
load_extension
(
MSIPACKAGE
*
package
,
MSIRECORD
*
row
)
{
MSIEXTENSION
*
ext
;
DWORD
sz
;
LPCWSTR
buffer
;
/* fill in the data */
...
...
@@ -440,8 +439,7 @@ static MSIEXTENSION *load_extension( MSIPACKAGE* package, MSIRECORD *row )
list_add_tail
(
&
package
->
extensions
,
&
ext
->
entry
);
sz
=
256
;
MSI_RecordGetStringW
(
row
,
1
,
ext
->
Extension
,
&
sz
);
ext
->
Extension
=
load_dynamic_stringW
(
row
,
1
);
TRACE
(
"loading extension %s
\n
"
,
debugstr_w
(
ext
->
Extension
));
buffer
=
MSI_RecordGetString
(
row
,
2
);
...
...
@@ -1343,7 +1341,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
ext
,
&
package
->
extensions
,
MSIEXTENSION
,
entry
)
{
WCHAR
extension
[
257
]
;
LPWSTR
extension
;
MSIFEATURE
*
feature
;
if
(
!
ext
->
Component
)
...
...
@@ -1377,11 +1375,13 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
mark_mime_for_install
(
ext
->
Mime
);
extension
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
ext
->
Extension
)
+
2
)
*
sizeof
(
WCHAR
)
);
extension
[
0
]
=
'.'
;
extension
[
1
]
=
0
;
strcatW
(
extension
,
ext
->
Extension
);
lstrcpyW
(
extension
+
1
,
ext
->
Extension
);
RegCreateKeyW
(
HKEY_CLASSES_ROOT
,
extension
,
&
hkey
);
HeapFree
(
GetProcessHeap
(),
0
,
extension
);
if
(
ext
->
Mime
)
{
...
...
@@ -1452,7 +1452,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
mt
,
&
package
->
mimes
,
MSIMIME
,
entry
)
{
WCHAR
extension
[
257
]
;
LPWSTR
extension
;
LPCWSTR
exten
;
LPCWSTR
mime
;
static
const
WCHAR
fmt
[]
=
...
...
@@ -1477,17 +1477,20 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
mime
=
mt
->
ContentType
;
exten
=
mt
->
Extension
->
Extension
;
extension
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
exten
)
+
2
)
*
sizeof
(
WCHAR
)
);
extension
[
0
]
=
'.'
;
extension
[
1
]
=
0
;
strcatW
(
extension
,
exten
);
lstrcpyW
(
extension
+
1
,
exten
);
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,(
strlenW
(
mime
)
+
strlenW
(
fmt
)
+
1
)
*
sizeof
(
WCHAR
));
sprintfW
(
key
,
fmt
,
mime
);
RegCreateKeyW
(
HKEY_CLASSES_ROOT
,
key
,
&
hkey
);
RegSetValueExW
(
hkey
,
szExten
,
0
,
REG_SZ
,(
LP
VOID
)
extension
,
RegSetValueExW
(
hkey
,
szExten
,
0
,
REG_SZ
,(
LP
BYTE
)
extension
,
(
strlenW
(
extension
)
+
1
)
*
sizeof
(
WCHAR
));
HeapFree
(
GetProcessHeap
(),
0
,
extension
);
HeapFree
(
GetProcessHeap
(),
0
,
key
);
if
(
mt
->
CLSID
[
0
])
...
...
dlls/msi/helpers.c
View file @
1f09af30
...
...
@@ -458,11 +458,11 @@ void free_extension( MSIEXTENSION *ext )
HeapFree
(
GetProcessHeap
(),
0
,
verb
);
}
HeapFree
(
GetProcessHeap
(),
0
,
ext
->
Extension
);
HeapFree
(
GetProcessHeap
(),
0
,
ext
->
ProgIDText
);
HeapFree
(
GetProcessHeap
(),
0
,
ext
);
}
/* Called when the package is being closed */
void
ACTION_free_package_structures
(
MSIPACKAGE
*
package
)
{
...
...
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