sfxge(4): make last byte of module information available

Adjust bounds so the interface supports reading
the last available byte of data.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18273
This commit is contained in:
Andrew Rybchenko 2018-11-30 07:08:16 +00:00
parent 1ad53cbf7e
commit a10539aa18
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341311

View File

@ -326,7 +326,7 @@ efx_phy_module_get_info(
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT(data != NULL);
if ((uint32_t)offset + len > 0xff) {
if ((uint32_t)offset + len > 0x100) {
rc = EINVAL;
goto fail1;
}