From patchwork Thu Jun 15 18:24:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 9789817 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96A0560325 for ; Thu, 15 Jun 2017 18:26:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 901192861E for ; Thu, 15 Jun 2017 18:26:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84E882862C; Thu, 15 Jun 2017 18:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A4B2861E for ; Thu, 15 Jun 2017 18:26:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063AbdFOSZ3 (ORCPT ); Thu, 15 Jun 2017 14:25:29 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34255 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752884AbdFOSZY (ORCPT ); Thu, 15 Jun 2017 14:25:24 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7B68020A76; Thu, 15 Jun 2017 14:25:18 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 15 Jun 2017 14:25:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=animalcreek.com; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=S6z duChcao+Qmry9NnbNuoTHbXI/RFuFmdAtmGJOmyY=; b=M12G7fQSDhfXrzLaGaX fCCCX9HGtreKJyV20pXpYV9iac7PmtpJo/7CmWEzbhlfa+rFx7Qeg/Y/29ish7ME PlsHoQ/vvRDgO//gIvq7nKN42zHTjwUBxEcaieV9zdK1C+p+1lPZs1atL8O9W/J+ W1IQMOxLJzj+ySrL3Xqh8J4E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=S6zduChcao+Qmry9NnbNuoTHbXI/RFuFmdAtmGJOm yY=; b=ojOIffp5X867KTasAs4J7cNRCdriIs4LsGeftd2iRp/pxOMeNJXCUuCip B28XA8UkDRTMohZgBsnMIWJfEmCzk+z+nKOhOmMaqyDGbX2N/lasxRqPsTH/E2Aw 2KyITUg1lAZP4mpB1T6p/BRS8cqN0jbcXzTN0KnWpwufe4cJ3aLK41EG64JAcfE9 Y9dlUJ3OMwf6znWnC2WWW3xl6MPImtn/EKaIu16JFe2sLEV7KPx6izRLlGQpeH7r 2FbonDOLbKqaowQdqb5VPE5dHiBurBUAQfTJqtAcPITyNo3ADyac8/ZNhcrZbXb/ AuzExNbKVw0Ivr7xMRUg6WtCAIRbg== X-ME-Sender: X-Sasl-enc: cu4PPZ4OswJ2AZ+mzYeOfZb1iq2kolhSpAZ35Boh6pK9 1497551118 Received: from blue.animalcreek.com (ip68-2-81-12.ph.ph.cox.net [68.2.81.12]) by mail.messagingengine.com (Postfix) with ESMTPA id 39E817E970; Thu, 15 Jun 2017 14:25:18 -0400 (EDT) Received: from blue.animalcreek.com (localhost [127.0.0.1]) by blue.animalcreek.com (Postfix) with ESMTP id 808C4A20501; Thu, 15 Jun 2017 11:25:17 -0700 (MST) From: Mark Greer To: Samuel Ortiz Cc: linux-wireless@vger.kernel.org, linux-nfc@lists.01.org, Mark Greer Subject: [PATCH 03/23] ndef: Unrecognized WKTs should return RECORD_TYPE_UNKNOWN Date: Thu, 15 Jun 2017 11:24:56 -0700 Message-Id: <20170615182516.4508-4-mgreer@animalcreek.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170615182516.4508-1-mgreer@animalcreek.com> References: <20170615182516.4508-1-mgreer@animalcreek.com> Organization: Animal Creek Technologies, Inc. Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;