diff options
-rw-r--r-- | src/phFriNfc_TopazDynamicMap.c | 5 | ||||
-rw-r--r-- | src/phHciNfc_AdminMgmt.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/phFriNfc_TopazDynamicMap.c b/src/phFriNfc_TopazDynamicMap.c index 2aa29ea..e9d1529 100644 --- a/src/phFriNfc_TopazDynamicMap.c +++ b/src/phFriNfc_TopazDynamicMap.c @@ -199,6 +199,9 @@ so there are 4 segements in the card */ ((((block_no) + 1) == TOPAZ_STATIC_LOCK_FIRST_BLOCK_NO) ? \ (((block_no) + 1) + TOPAZ_STATIC_LOCK_BLOCK_AREAS) : \ ((block_no) + 1)) +/* Check topaz spec version number */ +#define TOPAZ_COMPARE_VERSION(device_ver, tag_ver) \ + ((device_ver & 0xF0) >= (tag_ver & 0xF0)) #ifdef FRINFC_READONLY_NDEF @@ -2368,7 +2371,7 @@ phFriNfc_Tpz_H_CheckCCBytesForWrite ( { check_index = (uint8_t)(check_index + 1); - if ((check_cc_rw[0] != ps_tpz_info->CCByteBuf[1]) || + if ((!TOPAZ_COMPARE_VERSION(check_cc_rw[0], ps_tpz_info->CCByteBuf[1])) || (check_cc_rw[1] != ps_tpz_info->CCByteBuf[2]) || (check_cc_rw[2] != ps_tpz_info->CCByteBuf[3])) { diff --git a/src/phHciNfc_AdminMgmt.c b/src/phHciNfc_AdminMgmt.c index b65abf2..45298a1 100644 --- a/src/phHciNfc_AdminMgmt.c +++ b/src/phHciNfc_AdminMgmt.c @@ -997,6 +997,7 @@ static pipe_id = hcp_message->payload[RESPONSE_PIPEID_OFFSET]; p_pipe_info = (phHciNfc_Pipe_Info_t *) phOsalNfc_GetMemory(sizeof(phHciNfc_Pipe_Info_t)); + memset(p_pipe_info, 0, sizeof(phHciNfc_Pipe_Info_t)); if(NULL != p_pipe_info) { /* The Source Host is the UICC Host */ |