]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mpr, mps: Fix an off-by-one bug in the BTDH_MAPPING ioctl
authorMark Johnston <markj@FreeBSD.org>
Fri, 8 Jan 2021 18:32:05 +0000 (13:32 -0500)
committerMark Johnston <markj@FreeBSD.org>
Fri, 8 Jan 2021 18:32:05 +0000 (13:32 -0500)
commitadc0dcc352bb9f5a67a054d95c6959ea5aa26d91
treeec02dca17adf75cc162f9fdff8f72182e49048c1
parentde828a91db29fb20440e0d92f3d3136b314a9584
mpr, mps: Fix an off-by-one bug in the BTDH_MAPPING ioctl

The device mapping table contains sc->max_devices entries, so only
indices in [0, sc->max_devices) are valid.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27964
sys/dev/mpr/mpr_user.c
sys/dev/mps/mps_user.c