Ports hashmap contains dangling pointers
Bug #932804 reported by
David Henningsson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pulseaudio (Ubuntu) |
Fix Released
|
Medium
|
David Henningsson |
Bug Description
sink->ports hashmap contains dangling pointers if we have "settings", at least in precise.
Related branches
Changed in pulseaudio (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → David Henningsson (diwic) |
importance: | High → Medium |
To post a comment you must log in.
If alsa settings/options were used, the string to construct the
name was freed, leading to dangling pointers to strings inside
the hashmap.
BugLink: https:/ /bugs.launchpad .net/bugs/ 932804 alsa/alsa- mixer.c | 4 ++--
Signed-off-by: David Henningsson <email address hidden>
---
src/modules/
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/ alsa/alsa- mixer.c b/src/modules/ alsa/alsa- mixer.c alsa/alsa- mixer.c alsa/alsa- mixer.c port_alsa_ init(pa_ hashmap *ports,
index 9bf8069..7e6ef54 100644
--- a/src/modules/
+++ b/src/modules/
@@ -4397,7 +4397,7 @@ static pa_device_port* device_
p = pa_device_ port_new( core, name, description, sizeof( pa_alsa_ port_data) );
pa_assert( p); put(ports, name, p); put(ports, p->name, p);
p->profiles = pa_hashmap_ new(pa_ idxset_ string_ hash_func, pa_idxset_ string_ compare_ func);
- pa_hashmap_
+ pa_hashmap_
data = PA_DEVICE_ PORT_DATA( p); port_alsa_ init(pa_ hashmap *ports,
pa_hashmap_ put(p-> profiles, cp->name, cp);
@@ -4412,7 +4412,7 @@ static pa_device_port* device_
if (extra) { put(extra, name, p); put(extra, p->name, p);
pa_device_ port_ref( p);
- pa_hashmap_
+ pa_hashmap_
}
--
1.7.9