summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-14 23:19:26 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-16 22:04:15 -0800
commitfca64d913b985d201bc4aa805cb51adf0e4fc5e0 (patch)
tree7852e036f1d355bae644f7550580c75deb5c2e17 /filters
parenta2cf846a5cd3b5f876537a92ea2c5e479cac5c77 (diff)
downloadmpv-fca64d913b985d201bc4aa805cb51adf0e4fc5e0.tar.bz2
mpv-fca64d913b985d201bc4aa805cb51adf0e4fc5e0.tar.xz
filter: fix potential NULL pointer deref
The rest of the function should be executed only if both are set. It seems like in practice this didn't happen yet with only one of them unset, but in theory it's possible. Found by Coverity.
Diffstat (limited to 'filters')
-rw-r--r--filters/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/filter.c b/filters/filter.c
index 84721b6c5e..8d88a7746e 100644
--- a/filters/filter.c
+++ b/filters/filter.c
@@ -325,7 +325,7 @@ static void init_connection(struct mp_pin *p)
// manual connections at the ends is still disconnected (or if this
// attempted to extend an existing connection, becomes dangling and gets
// disconnected).
- if (!in->manual_connection && !out->manual_connection)
+ if (!in->manual_connection || !out->manual_connection)
return;
assert(in->dir == MP_PIN_IN);