Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 324b0af6 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville
Browse files

NFC: Fix LLCP TLV building routine



The if logic could lead to zero length TLVs.

Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 279cf174
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ u8 *nfc_llcp_build_tlv(u8 type, u8 *value, u8 value_length, u8 *tlv_length)
	length = llcp_tlv_length[type];
	if (length == 0 && value_length == 0)
		return NULL;
	else
	else if (length == 0)
		length = value_length;

	*tlv_length = 2 + length;