commit | a9bb32cfe1ee87ff831707dfdcbcae56f2b2a036 | [log] [tgz] |
---|---|---|
author | Emil Velikov <emil.l.velikov@gmail.com> | Fri Feb 05 00:41:13 2021 +0000 |
committer | Emil Velikov <emil.l.velikov@gmail.com> | Fri Feb 26 13:03:06 2021 +0000 |
tree | bf8c54684a7d3f60af1e3937f28b2f8c0451c287 | |
parent | 06844b6eaefb03c65d9b84a5b8503449ed275bc8 [diff] |
xf86drm: cap number of reported devices by drmGetDevice(2) Do as the documentation says - when devices non NULL, cap the reported devices to max_devices. Otherwise we risk out-of-bound access for users of the API. v2: - Fix this w/o breaking the API v3: - Drop local variables, flip inverted conditional (Simon) Issue: https://gitlab.freedesktop.org/mesa/drm/-/issues/56 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Simon Ser <contact@emersion.fr>