mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
protocol-native: Protect against clients trying to set a NULL port
For some reason, a badly behaving client was trying to set a NULL port, which caused PulseAudio to crash. Add safeguards on two levels just to be protected. (Also remove a redundant check.) BugLink: https://bugs.launchpad.net/bugs/951273 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
860d1cf3a7
commit
54cddc6ddf
3 changed files with 3 additions and 3 deletions
|
|
@ -2506,7 +2506,7 @@ int pa_source_set_port(pa_source *s, const char *name, pa_bool_t save) {
|
|||
return -PA_ERR_NOTIMPLEMENTED;
|
||||
}
|
||||
|
||||
if (!s->ports)
|
||||
if (!s->ports || !name)
|
||||
return -PA_ERR_NOENTITY;
|
||||
|
||||
if (!(port = pa_hashmap_get(s->ports, name)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue