Module Name: src
Committed By: christos
Date: Sat May 4 13:18:06 UTC 2024
Modified Files:
src/usr.bin/gzip: unlz.c
Log Message:
PR/58233: RVP: Fix lzip dictionary size calculation
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/gzip/unlz.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/gzip/unlz.c
diff -u src/usr.bin/gzip/unlz.c:1.9 src/usr.bin/gzip/unlz.c:1.10
--- src/usr.bin/gzip/unlz.c:1.9 Sat May 4 09:17:03 2024
+++ src/usr.bin/gzip/unlz.c Sat May 4 09:18:06 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: unlz.c,v 1.9 2024/05/04 13:17:03 christos Exp $ */
+/* $NetBSD: unlz.c,v 1.10 2024/05/04 13:18:06 christos Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -602,7 +602,7 @@ static unsigned
lz_get_dict_size(unsigned char c)
{
unsigned dict_size = 1 << (c & 0x1f);
- dict_size -= (dict_size >> 2) * ( (c >> 5) & 0x7);
+ dict_size -= (dict_size >> 4) * ( (c >> 5) & 0x7);
if (dict_size < MIN_DICTIONARY_SIZE || dict_size > MAX_DICTIONARY_SIZE)
return 0;
return dict_size;