From fca64d913b985d201bc4aa805cb51adf0e4fc5e0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 14 Feb 2018 23:19:26 +0100 Subject: 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. --- filters/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filters') 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); -- cgit v1.2.3