From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [iio:testing 17/95] drivers/iio/light/as73211.c:213 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 58
Date: Mon, 31 Aug 2020 20:03:56 +0800 [thread overview]
Message-ID: <202008312051.vAgGn6VB%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Christian Eggers <ceggers@arri.de>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Andy Shevchenko <andy.shevchenko@gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: 283d2403beb406f0906cfbb2c9d7aa61cbcbbeed
commit: 77ed24daa40b3ce41610268d8307a50d82b382ad [17/95] iio: light: as73211: New driver
:::::: branch date: 3 hours ago
:::::: commit date: 2 days ago
config: mips-randconfig-m031-20200831 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/iio/light/as73211.c:213 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 58
Old smatch warnings:
drivers/iio/light/as73211.c:214 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 59
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=77ed24daa40b3ce41610268d8307a50d82b382ad
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git fetch --no-tags iio testing
git checkout 77ed24daa40b3ce41610268d8307a50d82b382ad
vim +213 drivers/iio/light/as73211.c
77ed24daa40b3c Christian Eggers 2020-08-05 205
77ed24daa40b3c Christian Eggers 2020-08-05 206 static void as73211_integration_time_calc_avail(struct as73211_data *data)
77ed24daa40b3c Christian Eggers 2020-08-05 207 {
77ed24daa40b3c Christian Eggers 2020-08-05 208 int i;
77ed24daa40b3c Christian Eggers 2020-08-05 209
77ed24daa40b3c Christian Eggers 2020-08-05 210 for (i = 0; i < ARRAY_SIZE(data->int_time_avail); i++) {
77ed24daa40b3c Christian Eggers 2020-08-05 211 unsigned int time_us = as73211_integration_time_us(data, BIT(i));
77ed24daa40b3c Christian Eggers 2020-08-05 212
77ed24daa40b3c Christian Eggers 2020-08-05 @213 data->int_time_avail[i * 2 + 0] = time_us / USEC_PER_SEC;
77ed24daa40b3c Christian Eggers 2020-08-05 214 data->int_time_avail[i * 2 + 1] = time_us % USEC_PER_SEC;
77ed24daa40b3c Christian Eggers 2020-08-05 215 }
77ed24daa40b3c Christian Eggers 2020-08-05 216 }
77ed24daa40b3c Christian Eggers 2020-08-05 217
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34488 bytes --]
next reply other threads:[~2020-08-31 12:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 12:03 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-31 12:52 [iio:testing 17/95] drivers/iio/light/as73211.c:213 as73211_integration_time_calc_avail() error: buffer overflow 'data->int_time_avail' 30 <= 58 Dan Carpenter
2020-08-31 12:52 ` Dan Carpenter
2020-08-31 13:22 ` Andy Shevchenko
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=202008312051.vAgGn6VB%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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.