linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-kernel@vger.kernel.org, Yong Zhi <yong.zhi@intel.com>,
	Bingbu Cao <bingbu.cao@intel.com>,
	Tianshu Qiu <tian.shu.qiu@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2 1/2] media: staging/intel-ipu3: css: Fix wrong size comparison
Date: Wed, 4 Aug 2021 15:37:42 +0300	[thread overview]
Message-ID: <20210804123742.GH1931@kadam> (raw)
In-Reply-To: <3c9ac43d-09ca-e5d5-83a8-7b6d23928763@embeddedor.com>

I missed that you change < sizeof() to <= sizeof()...  Sakari is right
that it should be < sizeof().  <= doesn't work at all ever.  If you
wanted a higher limit then the next limit woule be:

	if (css->fw->size < struct_size(css->fwp, binary_header, 1))

regards,
dan carpenter


  reply	other threads:[~2021-08-04 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 12:07 [PATCH v2 0/2] Fix size comparison bug and use flexible array Gustavo A. R. Silva
2021-07-30 12:08 ` [PATCH v2 1/2] media: staging/intel-ipu3: css: Fix wrong size comparison Gustavo A. R. Silva
2021-08-02  6:05   ` Sakari Ailus
2021-08-02 13:46     ` Gustavo A. R. Silva
2021-08-04 12:37       ` Dan Carpenter [this message]
2021-08-10 15:18       ` Sakari Ailus
2021-08-10 16:26         ` Gustavo A. R. Silva
2021-08-10 16:30           ` Sakari Ailus
2021-08-10 16:40             ` Gustavo A. R. Silva
2021-07-30 12:09 ` [PATCH v2 2/2] media: staging/intel-ipu3: css: Use the struct_size() helper Gustavo A. R. Silva

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=20210804123742.GH1931@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=bingbu.cao@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=yong.zhi@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).