Fix crashes on disconnected pins in wmdks topologies. (#300)

* Fix crashes on disconnected pins in wmdks topologies.
* Fix potential assert on disconnected physical output pin in PinNew
This commit is contained in:
Colin McEwan 2020-11-19 02:22:22 +00:00 • committed by GitHub
commit 7e2a33c875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1057,8 +1057,9 @@ static const KSTOPOLOGY_CONNECTION* FindStartConnectionFrom(ULONG startPin, PaWi
}
}
/* Some devices may report topologies that leave pins unconnected. This may be by design or driver installation
issues. Pass the error condition back to caller. */
PA_DEBUG(("FindStartConnectionFrom: returning NULL\n"));
assert(FALSE);
return 0;
}
@ -1077,8 +1078,8 @@ static const KSTOPOLOGY_CONNECTION* FindStartConnectionTo(ULONG startPin, PaWinW
}
}
/* Unconnected pin. Inform caller. */
PA_DEBUG(("FindStartConnectionTo: returning NULL\n"));
assert(FALSE);
return 0;
}
@ -1970,8 +1971,8 @@ static PaWinWdmPin* PinNew(PaWinWdmFilter* parentFilter, unsigned long pinId, Pa
}
else
{
/* Should never come here! */
assert(FALSE);
/* Unconnected pin */
goto error;
}
}
}