* lib/hashcode-mem.c (hash_pjw_bare): Use size_t for loop index. --- ChangeLog | 3 +++ lib/hashcode-mem.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index 11744aeb9d..03575cf89b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2026-06-26 Paul Eggert <[email protected]> + hashcode-mem: don’t infloop if UINT_MAX < size + * lib/hashcode-mem.c (hash_pjw_bare): Use size_t for loop index. + gen-uni-tables: prefer size_t for size loops * lib/gen-uni-tables.c (output_predicate, output_category) (output_combclass, output_bidi_category, output_decimal_digit) diff --git a/lib/hashcode-mem.c b/lib/hashcode-mem.c index a4963afb68..30ee835107 100644 --- a/lib/hashcode-mem.c +++ b/lib/hashcode-mem.c @@ -34,7 +34,7 @@ hash_pjw_bare (const void *x, size_t n) const unsigned char *s = x; size_t h = 0; - for (unsigned int i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) h = s[i] + stdc_rotate_left (h, 9); return h; -- 2.54.0
