Search Linux Wireless

[PATCH 03/23] ndef: Unrecognized WKTs should return RECORD_TYPE_UNKNOWN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When get_record_type() doesn't recognize the record type in a record
with a Well Known Type TNF, it falls through to the next case clause
and returns RECORD_TYPE_MIME_TYPE.  This is incorrect so add a break
statement to the RECORD_TNF_WELLKNOWN case so that RECORD_TYPE_UNKNOWN
is returned.

Signed-off-by: Mark Greer <mgreer@xxxxxxxxxxxxxxx>
---
 src/ndef.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ndef.c b/src/ndef.c
index 99f3bc3..03d6b13 100644
--- a/src/ndef.c
+++ b/src/ndef.c
@@ -928,6 +928,7 @@ static enum record_type get_record_type(enum record_tnf tnf,
 				return RECORD_TYPE_UNKNOWN;
 
 		}
+		break;
 
 	case RECORD_TNF_MIME:
 		return RECORD_TYPE_MIME_TYPE;
-- 
2.13.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux