]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tipc: fix missing initializer in tipc_sendmsg()
authorJon Maloy <jon.maloy@ericsson.com>
Wed, 11 Apr 2018 23:15:48 +0000 (01:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2018 01:55:38 +0000 (21:55 -0400)
commit335b929b28aeb5bfc0698adb21deaf685b2982d1
treef6978c9de4fd5c6d35c0a4faf3400df5a29820c1
parent9d0c75bf6e03d9bf80c55b0f677dc9b982958fd5
tipc: fix missing initializer in tipc_sendmsg()

The stack variable 'dnode' in __tipc_sendmsg() may theoretically
end up tipc_node_get_mtu() as an unitilalized variable.

We fix this by intializing the variable at declaration. We also add
a default else clause to the two conditional ones already there, so
that we never end up in the named function if the given address
type is illegal.

Reported-by: syzbot+b0975ce9355b347c1546@syzkaller.appspotmail.com
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c