summaryrefslogtreecommitdiffstats
path: root/src/phLibNfc_llcp.c
diff options
context:
space:
mode:
authorArnaud Ferir <arnaud.ferir@trusted-logic.com>2011-01-05 09:04:52 +0100
committerNick Pelly <npelly@google.com>2011-01-18 15:28:26 -0800
commit99e7261d709ad32e0203dced9f4a386c5f719adf (patch)
tree0aa0475d8c73d73dbb02835222cecd0ef6b3de17 /src/phLibNfc_llcp.c
parentd9d57394761c70786f5058f82e7528bfaf1807a0 (diff)
downloadexternal_libnfc-nxp-99e7261d709ad32e0203dced9f4a386c5f719adf.zip
external_libnfc-nxp-99e7261d709ad32e0203dced9f4a386c5f719adf.tar.gz
external_libnfc-nxp-99e7261d709ad32e0203dced9f4a386c5f719adf.tar.bz2
Fixed parameters checking in LLCP.
Avoid NULL pointer dereferencing in some situations. Change-Id: I020f0a5342acdc49f7f3804e9341ed0fc0f307ee
Diffstat (limited to 'src/phLibNfc_llcp.c')
-rw-r--r--src/phLibNfc_llcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/phLibNfc_llcp.c b/src/phLibNfc_llcp.c
index 2f78ab6..ab518a2 100644
--- a/src/phLibNfc_llcp.c
+++ b/src/phLibNfc_llcp.c
@@ -71,6 +71,11 @@ STATIC NFCSTATUS static_CheckDevice(phLibNfc_Handle hRemoteDevice)
{
phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo = (phLibNfc_sRemoteDevInformation_t*)hRemoteDevice;
+ if (hRemoteDevice == NULL)
+ {
+ return NFCSTATUS_INVALID_PARAMETER;
+ }
+
/* If local device is the Initiator (remote is Target),
* check if connection is correct
*/