>From e57121a9ca468f2bbb16e468f325da14d4a5b6d0 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 21 Sep 2026 17:40:30 -0400 Subject: [PATCH] fixups to ikmlt --- src/internal/ikmlt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/internal/ikmlt.c b/src/internal/ikmlt.c index c6e5c8ce..28153921 100644 --- a/src/internal/ikmlt.c +++ b/src/internal/ikmlt.c @@ -21,6 +21,8 @@ const void *ikmlt_lookup(const unsigned char *ld, int key) { unsigned start, shift, scale, cnt, val, x, k = key; + if (!ld) return 0; + do { start = (unsigned)ld[0]<<24 | ld[1]<<16 | ld[2]<<8 | ld[3]; k -= start; @@ -50,6 +52,6 @@ const void *ikmlt_lookup(const unsigned char *ld, int key) const void *ikmlt_lookup_path(const unsigned char *ld, const int *path) { - for (int i=0; i