From: Dan Carpenter <dan.carpenter@oracle.com>
To: Fariya Fatima <fariyaf@gmail.com>,
kbuild@01.org, linux-wireless@vger.kernel.org
Subject: Re: [kbuild-all] [wireless-next:master 316/316] drivers/net/wireless/rsi/rsi_91x_debugfs.c:296 rsi_init_dbgfs() error: potential null dereference 'dev_dbgfs'. (kzalloc returns null)
Date: Thu, 27 Mar 2014 19:01:05 +0300 [thread overview]
Message-ID: <20140327160105.GU7045@mwanda> (raw)
In-Reply-To: <20140327154507.GA27177@mwanda>
On Thu, Mar 27, 2014 at 06:45:07PM +0300, Dan Carpenter wrote:
> > drivers/net/wireless/rsi/rsi_91x_usb.c:289 rsi_usb_write_register_multiple() warn: '__min2' 4096 can't fit into 255 'transfer'
The code for this one is:
transfer = min_t(int, count, 4096);
It's complaining because "tranfers" is u8, but the cast to int always
makes me worry negative values. In this case, count is not user
controlled so it's safe. But that's a common security problem you
should be aware of. It's better to cast it to an unsigned value.
regards,
dan carpenter
next parent reply other threads:[~2014-03-27 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53275729.QHDAYltTUiN7HGNZ%fengguang.wu@intel.com>
[not found] ` <20140327154507.GA27177@mwanda>
2014-03-27 16:01 ` Dan Carpenter [this message]
[not found] ` <CAG+h2qigvA+yfPt9iRv6eZCLppwFznuZ=Hdk5Yxr-EB_9WTQig@mail.gmail.com>
2014-03-28 9:01 ` [kbuild-all] [wireless-next:master 316/316] drivers/net/wireless/rsi/rsi_91x_debugfs.c:296 rsi_init_dbgfs() error: potential null dereference 'dev_dbgfs'. (kzalloc returns null) Dan Carpenter
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=20140327160105.GU7045@mwanda \
--to=dan.carpenter@oracle.com \
--cc=fariyaf@gmail.com \
--cc=kbuild@01.org \
--cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.