Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / net / tipc / netlink_compat.c
index 1eadc95..a0c9057 100644 (file)
@@ -574,7 +574,8 @@ static int tipc_nl_compat_link_dump(struct tipc_nl_compat_msg *msg,
 
        link_info.dest = nla_get_flag(link[TIPC_NLA_LINK_DEST]);
        link_info.up = htonl(nla_get_flag(link[TIPC_NLA_LINK_UP]));
-       strcpy(link_info.str, nla_data(link[TIPC_NLA_LINK_NAME]));
+       nla_strlcpy(link_info.str, link[TIPC_NLA_LINK_NAME],
+                   TIPC_MAX_LINK_NAME);
 
        return tipc_add_tlv(msg->rep, TIPC_TLV_LINK_INFO,
                            &link_info, sizeof(link_info));
@@ -802,7 +803,7 @@ static int tipc_nl_compat_name_table_dump(struct tipc_nl_compat_msg *msg,
                goto out;
 
        tipc_tlv_sprintf(msg->rep, "%-10u %s",
-                        nla_get_u32(publ[TIPC_NLA_PUBL_REF]),
+                        nla_get_u32(publ[TIPC_NLA_PUBL_KEY]),
                         scope_str[nla_get_u32(publ[TIPC_NLA_PUBL_SCOPE])]);
 out:
        tipc_tlv_sprintf(msg->rep, "\n");