ping: prevent NULL pointer dereference on write to msg_name
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 18 Nov 2013 06:07:45 +0000 (07:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Nov 2013 21:02:03 +0000 (16:02 -0500)
commitcf970c002d270c36202bd5b9c2804d3097a52da0
tree5a8f07507f36caef9274c29504f428fef07f9760
parent4861292f730d7c461758575e2557e285a1d4521e
ping: prevent NULL pointer dereference on write to msg_name

A plain read() on a socket does set msg->msg_name to NULL. So check for
NULL pointer first.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c