哈希:
f879eb3febb6c294d684e8e7fecd5cc396ec5a28
作者:Bojan Novković <bnovkov@FreeBSD.org>
提交者:Bojan Novković <bnovkov@FreeBSD.org>
提交时间:2026-06-20 22:27:44 +0800
提交信息:
libc/dbm: Differentiate between uninitialized and end-of-db cursors
Commit `3a686b851f8f` fixed a `dbm_nextkey` edge case when using
the function after reaching the end of the database, but it inadvertently
broke the following `R_NEXT` behaviour:
"If the cursor is not yet set, this is the same as the R_FIRST flag."
Fix this by adding a new cursor constant that allows us to differentiate
between an unset cursor and a cursor that overflowed.
Reported by: ae
Fixes: 3a686b851f8f
Sponsored by: Klara, Inc.
Differential Revision:
https://reviews.freebsd.org/D57670
Reviewed by: markj