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
31946583
Commit
31946583
authored
Apr 29, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Store a copy of the file extension in the MSIMIME structure.
Fixes a crash that occurs when the extension foreign key points to nowhere. Reported by Vincent Pelletier.
parent
7d9d6707
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
classes.c
dlls/msi/classes.c
+6
-5
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+1
-0
No files found.
dlls/msi/classes.c
View file @
31946583
...
...
@@ -344,7 +344,7 @@ static MSIEXTENSION *load_given_extension( MSIPACKAGE *package, LPCWSTR extensio
static
MSIMIME
*
load_mime
(
MSIPACKAGE
*
package
,
MSIRECORD
*
row
)
{
LPCWSTR
buffer
;
LPCWSTR
extension
;
MSIMIME
*
mt
;
/* fill in the data */
...
...
@@ -356,8 +356,9 @@ static MSIMIME *load_mime( MSIPACKAGE* package, MSIRECORD *row )
mt
->
ContentType
=
msi_dup_record_field
(
row
,
1
);
TRACE
(
"loading mime %s
\n
"
,
debugstr_w
(
mt
->
ContentType
));
buffer
=
MSI_RecordGetString
(
row
,
2
);
mt
->
Extension
=
load_given_extension
(
package
,
buffer
);
extension
=
MSI_RecordGetString
(
row
,
2
);
mt
->
Extension
=
load_given_extension
(
package
,
extension
);
mt
->
suffix
=
strdupW
(
extension
);
mt
->
clsid
=
msi_dup_record_field
(
row
,
3
);
mt
->
Class
=
load_given_class
(
package
,
mt
->
clsid
);
...
...
@@ -1467,7 +1468,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
uirow
=
MSI_CreateRecord
(
2
);
MSI_RecordSetStringW
(
uirow
,
1
,
mt
->
ContentType
);
MSI_RecordSetStringW
(
uirow
,
2
,
mt
->
Extension
->
Extension
);
MSI_RecordSetStringW
(
uirow
,
2
,
mt
->
suffix
);
ui_actiondata
(
package
,
szRegisterMIMEInfo
,
uirow
);
msiobj_release
(
&
uirow
->
hdr
);
}
...
...
@@ -1512,7 +1513,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
uirow
=
MSI_CreateRecord
(
2
);
MSI_RecordSetStringW
(
uirow
,
1
,
mime
->
ContentType
);
MSI_RecordSetStringW
(
uirow
,
2
,
mime
->
Extension
->
Extension
);
MSI_RecordSetStringW
(
uirow
,
2
,
mime
->
suffix
);
ui_actiondata
(
package
,
szUnregisterMIMEInfo
,
uirow
);
msiobj_release
(
&
uirow
->
hdr
);
}
...
...
dlls/msi/msipriv.h
View file @
31946583
...
...
@@ -553,6 +553,7 @@ struct tagMSIMIME
struct
list
entry
;
LPWSTR
ContentType
;
/* Primary Key */
MSIEXTENSION
*
Extension
;
LPWSTR
suffix
;
LPWSTR
clsid
;
MSICLASS
*
Class
;
/* not in the table, set during installation */
...
...
dlls/msi/package.c
View file @
31946583
...
...
@@ -214,6 +214,7 @@ static void free_package_structures( MSIPACKAGE *package )
MSIMIME
*
mt
=
LIST_ENTRY
(
item
,
MSIMIME
,
entry
);
list_remove
(
&
mt
->
entry
);
msi_free
(
mt
->
suffix
);
msi_free
(
mt
->
clsid
);
msi_free
(
mt
->
ContentType
);
msi_free
(
mt
);
...
...
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