CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2023/08/15 14:51:45
Modified files:
usr.sbin/btrace: btrace.c
Log message:
btrace(8): fix out of bounds read using argN in BEGIN/END.
The argN builtins aren't valid in BEGIN or END actions. The fake
probe number btrace uses to facilitate other valid builtins caused
an out of bound read of an array, producing a segfault.
Change the fake probe number to 0 as it's an unsigned int and check
for that condition.
Adds asserts near other probe array indexing to catch future issues.
ok kn@