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 <[email protected]>
---
 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

Reply via email to