Last active
October 6, 2017 20:16
-
-
Save grigorye/d472b76f55e5d2fa064b1d72fb2c0665 to your computer and use it in GitHub Desktop.
Workaround for minidlna crashing on macOS 10.13 (17A405)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur minidlna-1.2.1/getifaddr.c minidlna-1.2.1-sdl_alen-0-8/getifaddr.c | |
--- minidlna-1.2.1/getifaddr.c 2017-08-24 19:28:25.000000000 +0200 | |
+++ minidlna-1.2.1-sdl_alen-0-8/getifaddr.c 2017-10-06 22:05:06.000000000 +0200 | |
@@ -206,6 +206,10 @@ | |
#else | |
struct sockaddr_dl *sdl; | |
sdl = (struct sockaddr_dl*)p->ifa_addr; | |
+ if (sdl->sdl_alen == 0) | |
+ continue; | |
+ if (6 < sdl->sdl_alen) | |
+ continue; | |
memcpy(mac, LLADDR(sdl), sdl->sdl_alen); | |
#endif | |
if (MACADDR_IS_ZERO(mac)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment