Skip to content

Commit

Permalink
netowkrd: initialize variables
Browse files Browse the repository at this point in the history
Before this, in manager_rtnl_process_rule(), iif and oif are not
initialized. However, message may not contain FRA_IIFNAME or
FRA_IIFNAME. Thus, uninitialized values are set to RoutingPolicyRule
and causes segfault.
This makes iif and oif be initialized as NULL.

Fixes systemd#7704.
  • Loading branch information
yuwata committed Dec 19, 2017
1 parent 82a18dc commit 735b557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/networkd-manager.c
Expand Up @@ -730,7 +730,7 @@ int manager_rtnl_process_rule(sd_netlink *rtnl, sd_netlink_message *message, voi
union in_addr_union to, from;
uint32_t fwmark = 0, table = 0;
Manager *m = userdata;
char *iif, *oif;
char *iif = NULL, *oif = NULL;
uint16_t type;
int family;
int r;
Expand Down

0 comments on commit 735b557

Please sign in to comment.