Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
6517b2d2
Commit
6517b2d2
authored
Jul 06, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neighbor/upnp: remove D-Bus filter and match in Close()
Fixes use-after-free crash bug during MPD shutdown.
parent
bfdf13dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
NEWS
NEWS
+2
-0
UdisksNeighborPlugin.cxx
src/neighbor/plugins/UdisksNeighborPlugin.cxx
+10
-7
No files found.
NEWS
View file @
6517b2d2
...
@@ -12,6 +12,8 @@ ver 0.21.25 (not yet released)
...
@@ -12,6 +12,8 @@ ver 0.21.25 (not yet released)
* output
* output
- osx: improve sample rate selection
- osx: improve sample rate selection
- osx: fix noise while stopping
- osx: fix noise while stopping
* neighbor
- upnp: fix crash during shutdown
* Windows/Android:
* Windows/Android:
- fix Boost detection after breaking change in Meson 0.54
- fix Boost detection after breaking change in Meson 0.54
...
...
src/neighbor/plugins/UdisksNeighborPlugin.cxx
View file @
6517b2d2
...
@@ -47,6 +47,11 @@ ToNeighborInfo(const UDisks2::Object &o) noexcept
...
@@ -47,6 +47,11 @@ ToNeighborInfo(const UDisks2::Object &o) noexcept
return
{
o
.
GetUri
(),
o
.
path
};
return
{
o
.
GetUri
(),
o
.
path
};
}
}
static
constexpr
char
udisks_neighbor_match
[]
=
"type='signal',sender='"
UDISKS2_INTERFACE
"',"
"interface='"
DBUS_OM_INTERFACE
"',"
"path='"
UDISKS2_PATH
"'"
;
class
UdisksNeighborExplorer
final
class
UdisksNeighborExplorer
final
:
public
NeighborExplorer
{
:
public
NeighborExplorer
{
...
@@ -110,11 +115,7 @@ UdisksNeighborExplorer::DoOpen()
...
@@ -110,11 +115,7 @@ UdisksNeighborExplorer::DoOpen()
try
{
try
{
Error
error
;
Error
error
;
dbus_bus_add_match
(
connection
,
dbus_bus_add_match
(
connection
,
udisks_neighbor_match
,
error
);
"type='signal',sender='"
UDISKS2_INTERFACE
"',"
"interface='"
DBUS_OM_INTERFACE
"',"
"path='"
UDISKS2_PATH
"'"
,
error
);
error
.
CheckThrow
(
"DBus AddMatch error"
);
error
.
CheckThrow
(
"DBus AddMatch error"
);
dbus_connection_add_filter
(
connection
,
dbus_connection_add_filter
(
connection
,
...
@@ -147,8 +148,10 @@ UdisksNeighborExplorer::DoClose() noexcept
...
@@ -147,8 +148,10 @@ UdisksNeighborExplorer::DoClose() noexcept
list_request
.
Cancel
();
list_request
.
Cancel
();
}
}
// TODO: remove_match
auto
&
connection
=
GetConnection
();
// TODO: remove_filter
dbus_connection_remove_filter
(
connection
,
HandleMessage
,
this
);
dbus_bus_remove_match
(
connection
,
udisks_neighbor_match
,
nullptr
);
dbus_glue
.
Destruct
();
dbus_glue
.
Destruct
();
}
}
...
...
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