static int wifi_filter(struct ndef_record *record)
{
- if (record->type_length != os_strlen(wifi_handover_type))
+ if (record->type == NULL ||
+ record->type_length != os_strlen(wifi_handover_type))
return 0;
if (os_memcmp(record->type, wifi_handover_type,
os_strlen(wifi_handover_type)) != 0)
static int p2p_filter(struct ndef_record *record)
{
- if (record->type_length != os_strlen(p2p_handover_type))
+ if (record->type == NULL ||
+ record->type_length != os_strlen(p2p_handover_type))
return 0;
if (os_memcmp(record->type, p2p_handover_type,
os_strlen(p2p_handover_type)) != 0)