git: DragonFly_RELEASE_6_4 net/radix: Fix rn_refines() and add the function description
Aaron LI
aly at crater.dragonflybsd.org
Tue Sep 19 17:09:51 PDT 2023
commit 3e2f3c2108b47fb248be1cf626d5ba1a7310a2ff
Author: Aaron LI <aly at aaronly.me>
Date: Sat Jun 17 09:36:39 2023 +0800
net/radix: Fix rn_refines() and add the function description
After 'n++' called in the 'longer' assignment, the clen(n) becomes
invalid since the first byte is no longer the key length. This caused
the function to always return FALSE and could lead to out-of-bound
memory access.
Fix the bug, and describe the function's usage and return value.
The bug was introduced in commit 2e9572d in 2004.
Reported-by: dczheng
Summary of changes:
sys/net/radix.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3e2f3c2108b47fb248be1cf626d5ba1a7310a2ff
--
DragonFly BSD source repository
More information about the Commits
mailing list