chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7255a3
)
clients/playrtp.c: Don't crash if an interface has a null address.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 4 May 2020 15:25:35 +0000
(16:25 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 4 May 2020 18:57:15 +0000
(19:57 +0100)
Just skip it and move on.
clients/playrtp.c
patch
|
blob
|
blame
|
history
diff --git
a/clients/playrtp.c
b/clients/playrtp.c
index 8878e8cb1e08b0e8059a543056ef970d0c27085a..372bfcf63c83373d078011019b89665463e4e2a0 100644
(file)
--- a/
clients/playrtp.c
+++ b/
clients/playrtp.c
@@
-809,6
+809,7
@@
int main(int argc, char **argv) {
disorder_fatal(errno, "error calling getifaddrs");
/* Try to pick a good one */
for(; ifa; ifa = ifa->ifa_next) {
disorder_fatal(errno, "error calling getifaddrs");
/* Try to pick a good one */
for(; ifa; ifa = ifa->ifa_next) {
+ if(!ifa->ifa_addr) continue;
if(bestifa == NULL
|| compare_interfaces(ifa, bestifa, family) > 0)
bestifa = ifa;
if(bestifa == NULL
|| compare_interfaces(ifa, bestifa, family) > 0)
bestifa = ifa;