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

(cherry picked from commit fbfdf57d65bedfab28f9debc8a4a8d6802f9338a)

Details

Provenance
dg612_cam.ac.ukAuthored on Jun 3 2024, 7:30 PM
jrtc27Committed on Sep 7 2024, 12:01 AM
Reviewer
imp
Differential Revision
D45463: Fix off-by-one bug in btpand
Parents
rG10e602164f02: ee: Fix use of uninitialised pointer in ispell_op
Branches
Unknown
Tags
Unknown