opnsense-src/lib/libc
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
..
aarch64 libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
amd64 libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
arm libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
capability cap_rights_is_empty: add MLINK 2024-12-02 15:35:40 -05:00
compat-43 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
csu csu: C standard requires errno on main() entry 2025-06-24 04:11:17 +03:00
db dbm_nextkey: Always return an error if we've reached the end of the database 2025-07-31 17:27:24 +02:00
gdtoa Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gen lib: Fix calls that naively set F_SETFD. 2025-07-17 17:00:32 +00:00
gmon Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
i386 libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
iconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
include libc,libthr: Remove __pthread_distribute_static_tls 2025-07-10 20:00:28 +01:00
inet Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
isc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
locale libc: locale: fix EUC shift check 2025-04-20 13:29:45 -05:00
md libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
nameser Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
net libc: Disable debugging code in the resolver. 2025-07-24 16:01:00 +02:00
nls libc: remove some XXX for russian translations of errnos 2024-11-03 18:59:16 +02:00
posix1e manuals: Fix "missing end of block" errors 2024-10-07 15:40:58 -03:00
powerpc libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
powerpc64 libc/powerpc64: Fix swapcontext(3) 2025-07-13 14:00:56 -04:00
powerpcspe Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
quad Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
regex Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
resolv libc: Remove unused pselect() implementation. 2025-07-24 16:01:09 +02:00
riscv libc, libthr: Ditch MD __pthread_distribute_static_tls helpers 2025-05-29 17:06:54 +01:00
rpc libc/rpc/svc_nl: plg a memory leak 2025-06-20 15:37:47 -07:00
secure libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
softfloat libc/softfloat: we don't export _fp[gs]et* symbols 2024-03-13 20:35:41 +00:00
stdio lib: Fix calls that naively set F_SETFD. 2025-07-17 17:00:32 +00:00
stdlib getopt_long.3: Use "optstring" consistently 2025-04-29 15:12:37 -04:00
stdtime libc: Test time zone change detection. 2025-07-18 19:49:57 +02:00
string memchr.3: Operates on objects, not strings 2025-07-25 09:48:42 -04:00
sys closefrom: always use close_range(2) 2025-06-06 22:58:29 +01:00
tests dbm_nextkey: Always return an error if we've reached the end of the database 2025-07-31 17:27:24 +02:00
uuid Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
x86/gen Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
xdr libc/xdr: remove bogus lseek(2) for xdr streams 2025-01-06 08:22:14 -08:00
yp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libc_nossp.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
Makefile libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
Makefile.depend Update Makefile.depend files 2024-10-14 10:26:17 -07:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Versions.def Create namespace for the symbols added during 15-CURRENT cycle 2023-09-22 10:16:29 +02:00