From: Luca Coelho <luca-XPOmlcxoEMv1KXRcyAk9cg@public.gmane.org>
To: David Binderman <dcb314-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>,
"johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linuxwifi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<linuxwifi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
<kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor error checking ?
Date: Mon, 17 Oct 2016 10:58:33 +0300 [thread overview]
Message-ID: <1476691113.3880.37.camel@coelho.fi> (raw)
In-Reply-To: <VI1PR08MB1022786893DC435E1A71F3069CD00-Rgw4eRhbCXnvbuUDGEufgykoKrxaZxrJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
Hi David,
On Mon, 2016-10-17 at 07:40 +0000, David Binderman wrote:
> Hello there,
>
> linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561]: (style) Checking if unsigned variable 'len' is less than zero.
>
> Source code is
>
> len = min((size_t)le32_to_cpu(rsp->len) << 2,
> iwl_rx_packet_payload_len(hcmd.resp_pkt) - sizeof(*rsp));
> len = min(len - delta, count);
> if (len < 0) {
> ret = -EFAULT;
> goto out;
> }
>
> Suggest improve error checking.
Thanks for reporting! A fix for this is already queued in our internal
tree and will be sent upstream soon.
--
Cheers,
Luca.
parent reply other threads:[~2016-10-17 7:58 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <VI1PR08MB1022786893DC435E1A71F3069CD00-Rgw4eRhbCXnvbuUDGEufgykoKrxaZxrJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476691113.3880.37.camel@coelho.fi \
--to=luca-xpomlcxoemv1kxrcyak9cg@public.gmane.org \
--cc=dcb314-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org \
--cc=emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxwifi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox