HomeFreeBSD

Fix off-by-one bug in btpand

Description

Fix off-by-one bug in btpand

ul reaches __arraycount(services) before the bound-check happens, causing undefined behaviour.

Reviewed by: imp, jrtc27
Fixes: 7718ced0ea98 ("Add btpand(8) daemon from NetBSD.")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45463

Details

Provenance
dg612_cam.ac.ukAuthored on Jun 3 2024, 7:30 PM
jrtc27Committed on Jun 3 2024, 7:30 PM
Reviewer
imp
Differential Revision
D45463: Fix off-by-one bug in btpand
Parents
rG7f1012ff7c8b: pctrie: predict successful allocation
Branches
Unknown
Tags
Unknown