summaryrefslogtreecommitdiffstats
path: root/src/phFriNfc_OvrHal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phFriNfc_OvrHal.c')
-rw-r--r--src/phFriNfc_OvrHal.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/phFriNfc_OvrHal.c b/src/phFriNfc_OvrHal.c
index bd9bc0a..539210e 100644
--- a/src/phFriNfc_OvrHal.c
+++ b/src/phFriNfc_OvrHal.c
@@ -34,7 +34,6 @@
#include <phFriNfc_SmtCrdFmt.h>
-
#ifdef PHFRINFC_OVRHAL_MOCKUP /* */
//#include <phLibNfc_Gen.h>
#endif /* PHFRINFC_OVRHAL_MOCKUP */
@@ -321,7 +320,7 @@ static void phFriNfc_OvrHal_CB_Transceive(void *context,
if (NULL != OvrHal)
{
- if(NULL != pRecvdata)
+ if(NULL != pRecvdata && OvrHal->TranceiveInfo.sRecvData.buffer != NULL && pRecvdata->buffer != NULL)
{
/* Work-around for the NFCIP Tranceive API */
memcpy(OvrHal->TranceiveInfo.sRecvData.buffer, pRecvdata->buffer, pRecvdata->length);
@@ -370,7 +369,7 @@ static void phFriNfc_OvrHal_CB_Receive(void *context,
if (NULL != OvrHal)
{
/* Copy the received buffer */
- if(NULL != pDataInfo)
+ if(NULL != pDataInfo && OvrHal->sReceiveData.buffer != NULL && pDataInfo->buffer != NULL)
{
memcpy(OvrHal->sReceiveData.buffer, pDataInfo->buffer, pDataInfo->length);
*OvrHal->pndef_recv_length = (uint16_t) pDataInfo->length;