From patchwork Thu Jun 15 18:25:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 9789829 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 20E7160325 for ; Thu, 15 Jun 2017 18:26:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A5B02861E for ; Thu, 15 Jun 2017 18:26:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F3E42862C; Thu, 15 Jun 2017 18:26:44 +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 C51B52861E for ; Thu, 15 Jun 2017 18:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdFOS0m (ORCPT ); Thu, 15 Jun 2017 14:26:42 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41667 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbdFOSZZ (ORCPT ); Thu, 15 Jun 2017 14:25:25 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2AD9C20A7F; Thu, 15 Jun 2017 14:25:19 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Thu, 15 Jun 2017 14:25:19 -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=TDH ijIZTaBzabTmOR94fFtu/SUv8M/FXktIF14Ym4ck=; b=JguRMVWtRnnzkIx1QMT g9+R2tLrR2L8fKeNs33CVqZ7O3r0IJxVh1ligcxGIXhii9l4FqOamCkmq714RJb0 iFp78BjVwTri5X9FpAJsOhQpLVP3f5WQhxhX3UzTFZzNCqNNFcpZ3hGoGkvWd8Ls a+0nQ57uPpqDFX8HfDZTqiWA= 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=TDHijIZTaBzabTmOR94fFtu/SUv8M/FXktIF14Ym4 ck=; b=UrIyISmN8BKi720cwR+PrTbXUXpPWUg1FQAMkHpF4wFjf8YEjbrKkZkJg Zjie85FeuvMA0cyvqdm8YQjdrj9iSNRwy4ZYDv+S1opuZRvk309VnAQNFsDSg7LS dtzsQ7dqJ6qPColabn2ywdDcGmBoWN6JDYQKzXZfNZFsdIV+4iNCr1BSdi1i3Gu9 cmDisZneYNO6X07ANV1CaYswNzUHRB3RBElbnVoT1j0MvhTX3UVEmGRg5V/ZKwBk n322DVBkALk9w+G/HpyPBuYLLdwlV56zN2L3BO3Af58YdhkV02Pzcj+9K+XBZZkg w7vDROvSO3wezcZ/fQO0Rv21AKyqQ== X-ME-Sender: X-Sasl-enc: cu4BM4AHrQ5wHp6mzYeOfZb1iq2kolhSpAZ35Boh6pK9 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 DD37C24953; 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 E8233A20597; 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 12/23] nfctype2: Don't read tags with bad magic number Date: Thu, 15 Jun 2017 11:25:05 -0700 Message-Id: <20170615182516.4508-13-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 NFC Type 2 tags that have a bad magic number need to be reformatted so do not try to read them. Signed-off-by: Mark Greer --- plugins/nfctype2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/nfctype2.c b/plugins/nfctype2.c index 559ecb0..f0f1158 100644 --- a/plugins/nfctype2.c +++ b/plugins/nfctype2.c @@ -275,6 +275,7 @@ static int meta_recv(uint8_t *resp, int length, void *data) if (TAG_DATA_NFC(cc) != TYPE2_MAGIC) { DBG("Mark as blank tag"); near_tag_set_blank(tag, TRUE); + goto out_tag; } else { near_tag_set_blank(tag, FALSE); }