opnsense-src/lib/libc/db
Bojan Novković 3a686b851f dbm_nextkey: Always return an error if we've reached the end of the database
POSIX.1 states that `dbm_nextkey` must return an invalid key
(i.e., `key.dptr == NULL`) after the end of the database was reached.
The current implementation of `hash_seq` will incorrectly restart
the key sequence after the end of the database is reached.

Fix this by checking the "current bucket" index when R_NEXT is passed.

Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51635
Reviewed by:	markj
2025-07-31 17:27:24 +02:00
..
btree Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
db Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
docs sccs: Manual changes 2023-11-26 22:23:58 -07:00
hash dbm_nextkey: Always return an error if we've reached the end of the database 2025-07-31 17:27:24 +02:00
man db/hash.c: Allow O_WRONLY in dbm_open 2025-07-30 11:31:16 +02:00
mpool Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
recno Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
test Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
changelog
Makefile.inc lib: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
README lib: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
Symbol.map libc: don't try to export mpool_stat 2024-04-16 22:14:20 +01:00

This is version 1.85 of the Berkeley DB code.

For information on compiling and installing this software, see the file
PORT/README.

Newer versions of this software will periodically be made available by
anonymous ftp from ftp.cs.berkeley.edu.  An archive in compressed format
is in ucb/4bsd/db.tar.Z, or in gzip format in ucb/4bsd/db.tar.gz.  If
you'd like to receive announcements of future releases of this software,
send email to the contact address below.

Email questions may be addressed to Keith Bostic at bostic@cs.berkeley.edu.

============================================
Distribution contents:

Makefile.inc	Ignore this, it's the 4.4BSD subsystem Makefile.
PORT		The per OS/architecture directories to use to build
		libdb.a, if you're not running 4.4BSD.  See the file
		PORT/README for more information.
README		This file.
btree		The B+tree routines.
changelog	List of changes, per version.
db		The dbopen(3) interface routine.
docs		Various USENIX papers, and the formatted manual pages.
hash		The extended linear hashing routines.
man		The unformatted manual pages.
mpool		The memory pool routines.
recno		The fixed/variable length record routines.
test		Test package.