aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/compress
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2005-05-18 05:24:08 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2005-05-18 05:24:08 +0000
commit39be1552ee5001bd1adf0f3e2c32f259237062e5 (patch)
tree6f302346fc6128feec44a11a5ddd062463fdc2f0 /usr.bin/compress
parent3f54cc0505733873300dc35860f4d4dc52da0fe2 (diff)
downloadsrc-39be1552ee5001bd1adf0f3e2c32f259237062e5.tar.gz
src-39be1552ee5001bd1adf0f3e2c32f259237062e5.zip
Unbreak r1.11 by delhij. Blind change from unsigned to signed char
pointer causes problems with sign extension and leads to compress(1) dumping core on any non-trivial incoming data.
Notes
Notes: svn path=/head/; revision=146336
Diffstat (limited to 'usr.bin/compress')
-rw-r--r--usr.bin/compress/zopen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/compress/zopen.c b/usr.bin/compress/zopen.c
index 091a2e3b14a3..f0ec8871cd81 100644
--- a/usr.bin/compress/zopen.c
+++ b/usr.bin/compress/zopen.c
@@ -241,7 +241,7 @@ zwrite(void *cookie, const char *wbp, int num)
code_int i;
int c, disp;
struct s_zstate *zs;
- const char *bp;
+ const u_char *bp;
u_char tmp;
int count;
@@ -250,7 +250,7 @@ zwrite(void *cookie, const char *wbp, int num)
zs = cookie;
count = num;
- bp = wbp;
+ bp = (const u_char *)wbp;
if (state == S_MIDDLE)
goto middle;
state = S_MIDDLE;