* [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function"
[not found] <1439793223-2623-1-git-send-email-christophe-h.ricard@st.com>
@ 2015-08-17 6:33 ` Christophe Ricard
2015-08-17 8:47 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Ricard @ 2015-08-17 6:33 UTC (permalink / raw)
To: sameo; +Cc: linux-nfc, christophe-h.ricard, christophe.ricard, stable
When NFC_ATTR_VENDOR_DATA is not set, data_len is 0 and data is NULL.
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
---
net/nfc/netlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 81dfaaa..73d1ca7 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -1524,6 +1524,7 @@ static int nfc_genl_vendor_cmd(struct sk_buff *skb,
if (data_len == 0)
return -EINVAL;
} else {
+ data = NULL;
data_len = 0;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function"
2015-08-17 6:33 ` [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function" Christophe Ricard
@ 2015-08-17 8:47 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2015-08-17 8:47 UTC (permalink / raw)
To: Christophe Ricard; +Cc: linux-nfc, christophe-h.ricard, stable
Hi Christophe,
On Mon, Aug 17, 2015 at 08:33:43AM +0200, Christophe Ricard wrote:
> When NFC_ATTR_VENDOR_DATA is not set, data_len is 0 and data is NULL.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
> ---
> net/nfc/netlink.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks.
Cheers,
Samuel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-17 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1439793223-2623-1-git-send-email-christophe-h.ricard@st.com>
2015-08-17 6:33 ` [PATCH] nfc: netlink: Fix "warning: 'data' may be used uninitialized in this function" Christophe Ricard
2015-08-17 8:47 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox