Skip to content

Commit

Permalink
Merge pull request #64 from Stormwind99/fix-mgroup-null-source-crash
Browse files Browse the repository at this point in the history
Fix crash during parsing of mgroup in conf file when optional source is excluded.
  • Loading branch information
troglobit committed Apr 22, 2017
2 parents 98cb358 + e5dab1f commit f9f8f77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parse-conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ static int join_mgroup(int lineno, char *ifname, char *source, char *group)
struct in_addr src;
struct in_addr grp;

if ((inet_pton(AF_INET, source, &src) <= 0)) {
memset(&src, 0, sizeof(src));

if (source && (inet_pton(AF_INET, source, &src) <= 0)) {
WARN("Invalid IPv4 multicast source: %s", source);
return 1;
}
Expand Down

0 comments on commit f9f8f77

Please sign in to comment.