30 bytes or so gone from zlib, also made stored blocks use 2 bytes less each
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1254 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2c96636160
commit
e1985f4f1c
2 changed files with 2 additions and 13 deletions
|
@ -111,14 +111,7 @@ int r=Z_OK;
|
|||
}
|
||||
break;
|
||||
case LENS:
|
||||
NEEDBITS(32)
|
||||
if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
|
||||
{
|
||||
s->mode = BAD;
|
||||
// z->msg = (char*)"err";//invalid stored block lengths";
|
||||
r = Z_DATA_ERROR;
|
||||
LEAVE
|
||||
}
|
||||
NEEDBITS(16)
|
||||
s->sub.left = (uInt)b & 0xffff;
|
||||
b = k = 0; /* dump bits */
|
||||
Tracev((stderr, "inflate: stored length %u\n", s->sub.left));
|
||||
|
@ -144,15 +137,12 @@ int r=Z_OK;
|
|||
case TABLE:
|
||||
NEEDBITS(14)
|
||||
s->sub.trees.table = t = (uInt)b & 0x3fff;
|
||||
#ifndef PKZIP_BUG_WORKAROUND
|
||||
if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
|
||||
{
|
||||
s->mode = BAD;
|
||||
// z->msg = (char*)"err";//too many length or distance symbols";
|
||||
r = Z_DATA_ERROR;
|
||||
LEAVE
|
||||
}
|
||||
#endif
|
||||
t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
|
||||
if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
|
||||
{
|
||||
|
@ -216,7 +206,7 @@ int r=Z_OK;
|
|||
if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
|
||||
(c == 16 && i < 1))
|
||||
{
|
||||
ZFREE(z, s->sub.trees.blens);
|
||||
// ZFREE(z, s->sub.trees.blens);
|
||||
s->mode = BAD;
|
||||
// z->msg = (char*)"err";//invalid bit length repeat";
|
||||
r = Z_DATA_ERROR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue