summaryrefslogtreecommitdiff
path: root/source4/lib/zlib/inflate.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/zlib/inflate.c')
-rw-r--r--source4/lib/zlib/inflate.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source4/lib/zlib/inflate.c b/source4/lib/zlib/inflate.c
index 0c1ff17951..fbecefd8f5 100644
--- a/source4/lib/zlib/inflate.c
+++ b/source4/lib/zlib/inflate.c
@@ -97,7 +97,7 @@ local int updatewindow OF((z_streamp strm, unsigned out));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned FAR *have, unsigned const char FAR *buf,
unsigned len));
int ZEXPORT inflateReset2(strm, flags)
@@ -565,7 +565,7 @@ z_streamp strm;
int flush;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ unsigned const char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -617,19 +617,19 @@ int flush;
if (
#endif
((BITS(8) << 8) + (hold >> 8)) % 31) {
- strm->msg = (char *)"incorrect header check";
+ strm->msg = "incorrect header check";
state->mode = BAD;
break;
}
if (BITS(4) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
+ strm->msg = "unknown compression method";
state->mode = BAD;
break;
}
DROPBITS(4);
len = BITS(4) + 8;
if (len > state->wbits) {
- strm->msg = (char *)"invalid window size";
+ strm->msg = "invalid window size";
state->mode = BAD;
break;
}
@@ -644,12 +644,12 @@ int flush;
NEEDBITS(16);
state->flags = (int)(hold);
if ((state->flags & 0xff) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
+ strm->msg = "unknown compression method";
state->mode = BAD;
break;
}
if (state->flags & 0xe000) {
- strm->msg = (char *)"unknown header flags set";
+ strm->msg = "unknown header flags set";
state->mode = BAD;
break;
}
@@ -753,7 +753,7 @@ int flush;
if (state->flags & 0x0200) {
NEEDBITS(16);
if (hold != (state->check & 0xffff)) {
- strm->msg = (char *)"header crc mismatch";
+ strm->msg = "header crc mismatch";
state->mode = BAD;
break;
}
@@ -808,7 +808,7 @@ int flush;
state->mode = TABLE;
break;
case 3:
- strm->msg = (char *)"invalid block type";
+ strm->msg = "invalid block type";
state->mode = BAD;
}
DROPBITS(2);
@@ -817,7 +817,7 @@ int flush;
BYTEBITS(); /* go to byte boundary */
NEEDBITS(32);
if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
- strm->msg = (char *)"invalid stored block lengths";
+ strm->msg = "invalid stored block lengths";
state->mode = BAD;
break;
}
@@ -853,7 +853,7 @@ int flush;
DROPBITS(4);
#ifndef PKZIP_BUG_WORKAROUND
if (state->nlen > 286 || state->ndist > 30) {
- strm->msg = (char *)"too many length or distance symbols";
+ strm->msg = "too many length or distance symbols";
state->mode = BAD;
break;
}
@@ -875,7 +875,7 @@ int flush;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
if (ret) {
- strm->msg = (char *)"invalid code lengths set";
+ strm->msg = "invalid code lengths set";
state->mode = BAD;
break;
}
@@ -899,7 +899,7 @@ int flush;
NEEDBITS(this.bits + 2);
DROPBITS(this.bits);
if (state->have == 0) {
- strm->msg = (char *)"invalid bit length repeat";
+ strm->msg = "invalid bit length repeat";
state->mode = BAD;
break;
}
@@ -922,7 +922,7 @@ int flush;
DROPBITS(7);
}
if (state->have + copy > state->nlen + state->ndist) {
- strm->msg = (char *)"invalid bit length repeat";
+ strm->msg = "invalid bit length repeat";
state->mode = BAD;
break;
}
@@ -941,7 +941,7 @@ int flush;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
if (ret) {
- strm->msg = (char *)"invalid literal/lengths set";
+ strm->msg = "invalid literal/lengths set";
state->mode = BAD;
break;
}
@@ -950,7 +950,7 @@ int flush;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
if (ret) {
- strm->msg = (char *)"invalid distances set";
+ strm->msg = "invalid distances set";
state->mode = BAD;
break;
}
@@ -993,7 +993,7 @@ int flush;
break;
}
if (this.op & 64) {
- strm->msg = (char *)"invalid literal/length code";
+ strm->msg = "invalid literal/length code";
state->mode = BAD;
break;
}
@@ -1025,7 +1025,7 @@ int flush;
}
DROPBITS(this.bits);
if (this.op & 64) {
- strm->msg = (char *)"invalid distance code";
+ strm->msg = "invalid distance code";
state->mode = BAD;
break;
}
@@ -1040,13 +1040,13 @@ int flush;
}
#ifdef INFLATE_STRICT
if (state->offset > state->dmax) {
- strm->msg = (char *)"invalid distance too far back";
+ strm->msg = "invalid distance too far back";
state->mode = BAD;
break;
}
#endif
if (state->offset > state->whave + out - left) {
- strm->msg = (char *)"invalid distance too far back";
+ strm->msg = "invalid distance too far back";
state->mode = BAD;
break;
}
@@ -1098,7 +1098,7 @@ int flush;
state->flags ? hold :
#endif
REVERSE(hold)) != state->check) {
- strm->msg = (char *)"incorrect data check";
+ strm->msg = "incorrect data check";
state->mode = BAD;
break;
}
@@ -1111,7 +1111,7 @@ int flush;
if (state->wrap && state->flags) {
NEEDBITS(32);
if (hold != (state->total & 0xffffffffUL)) {
- strm->msg = (char *)"incorrect length check";
+ strm->msg = "incorrect length check";
state->mode = BAD;
break;
}
@@ -1247,7 +1247,7 @@ gz_headerp head;
*/
local unsigned syncsearch(have, buf, len)
unsigned FAR *have;
-unsigned char FAR *buf;
+unsigned const char FAR *buf;
unsigned len;
{
unsigned got;