P2PS: Fix possible NULL pointer dereference in PD exchange
authorIlan Peer <ilan.peer@intel.com>
Thu, 8 Oct 2015 09:35:56 +0000 (12:35 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Oct 2015 09:29:19 +0000 (12:29 +0300)
commit572f1ead196a88b16375c25b743c76459a97272d
treea7cb30d1357d7548e9d6f15253b9719ee22a730e
parentcbb154973d3f71fa6aa55db15662a2389b7c380e
P2PS: Fix possible NULL pointer dereference in PD exchange

It is possible that p2p_build_prov_disc_resp() is called with a NULL
device entry, which might be dereferenced when calling
p2p->cfg->get_persistent_group() for the P2PS with persistent group
case. Fix this by checking the device pointer before accessing it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/p2p/p2p_pd.c