1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
|
2010-07-19: Stuart Caie <kyzer@4u.net>
* cabd_md5.c, chmd_md5.c: Replace writing files to disk then
MD5summing them, with an MD5summer built into mspack_system.
Much, much faster results.
* qtmd_decompress(): Robert Riebisch pointed out a Quantum
data integrity check that could never be tripped, because
frame_todo is unsigned, so it will never be decremented
below zero. Replaced the check with one that assumes that
decrementing past zero wraps frame_todo round to a number
more than its maximum value (QTM_FRAME_SIZE).
2010-07-18: Stuart Caie <kyzer@4u.net>
* cabd.c: Special logic to pass cabd_sys_read() errors back
to cabd_extract() wasn't compatible with the decompressor
logic of returning the same error repeatedly once unpacking
fails. This meant that if decompressing failed because of
a read error, then the next file in the same folder would
come back as "no error", but the decompressed wouldn't have
even attempted to decompress the file. Added a new state
variable, read_error, with the same lifespan as a decompressor,
to pass the underlying reason for MSPACK_ERR_READ errors back.
* mszipd.c: improve MS-ZIP recovery by saving all the bytes
decoded prior to a block failing. This requires remembering
how far we got through the block, so the code has been made
slightly slower (about 0.003 seconds slower per gigabyte
unpacked) by removing the local variable window_posn
and keeping it in the state structure instead.
2010-07-16: Stuart Caie <kyzer@4u.net>
* Makefile.am: strange interactions. When -std=c99 is used,
my Ubuntu's <stdio.h> (libc6-dev 2.11.1-0ubuntu7.2) does NOT
define fseeko() unless _LARGEFILE_SOURCE is also defined. But
configure always uses -std=gnu99, not -std=c99, so its test
determines _LARGEFILE_SOURCE isn't needed but HAVE_FSEEKO is
true. The implicit fseeko definition has a 32-bit rather than
64-bit offset, which means the mode parameter is interpreted
as part of the offset, and the mode is taken from the stack,
which is generally 0 (SEEK_SET). This breaks all SEEK_CURs.
The code works fine when -std=c99 is not set, so just remove
it for the time being.
2010-07-12: Stuart Caie <kyzer@4u.net>
* system.c: Reject reading/writing a negative number of bytes.
* chmd.c: allow zero-length files to be seen. Previously they were
skipped because they were mistaken for directory entries.
2010-07-08: Stuart Caie <kyzer@4u.net>
* qtmd.c: Larry Frieson found an important bug in the Quantum
decoder. Window wraps flush all unwritten data to disk.
However, sometimes less data is needed, which makes
out_bytes negative, which is then passed to write(). Some
write() implementations treat negative sizes it as a large
positive integer and segfault trying to write the buffer.
* Makefile.am, test/*.c: fixed automake file so that the
package passes a "make distcheck".
2010-07-07: Stuart Caie <kyzer@4u.net>
* doc/szdd_kwaj_format.html: explain SZDD/KWAJ file format.
* lzssd.c: fixed SZDD decompression bugs.
* test/chmd_compare: Add scripts for comparing chmd_md5 against
Microsoft's own code.
* test/chmd_md5.c: remove the need to decompress everything
twice, as this is already in chmx.c if needed.
2010-07-06: Stuart Caie <kyzer@4u.net>
* many files: added SZDD and KWAJ decompression support.
2010-06-18: Stuart Caie <kyzer@4u.net>
* system.h: expanded the test for 64-bit largefile support so
it also works on 64-bit native operating systems where you
don't have to define _FILE_OFFSET_BITS.
2010-06-17: Stuart Caie <kyzer@4u.net>
* libmspack.pc.in: Added pkg-config support. Thanks to
Patrice Dumas for the patch.
2010-06-14: Stuart Caie <kyzer@4u.net>
* qtmd.c, lzxd.c, mszipd.c: created new headers, readbits.h and
readhuff.h, which bundle up the bit-reading and huffman-reading
code found in the MSZIP, LZX and Quantum decoders.
2010-06-11: Stuart Caie <kyzer@4u.net>
* qtmd_static_init(): Removed function in favour of static const
tables, same rationale as for lzxd_static_init().
* qtmd_read_input(), zipd_read_input(): After testing against my
set of CABs from the wild, I've found both these functions _need_
an extra EOF flag, like lzxd_read_input() has. So I've added
it. This means CABs get decoded properly AND there's no reading
fictional bytes.
2010-06-03: Stuart Caie <kyzer@4u.net>
* test/cabd_md5.c: updated this so it has better output and
doesn't need to be in the same directory as the files for multi-
part sets.
2010-05-20: Stuart Caie <kyzer@4u.net>
* qtmd_read_input(), zipd_read_input(): Both these functions are
essentially copies of lzxd_read_input(), but that has a feature
they don't have - an extra EOF flag. So if EOF is
encountered (sys->read() returns 0 bytes), these don't pass on the
error. Their respective bit-reading functions that called them
then go on to access at least one byte of the input buffer, which
doesn't exist as sys->read() returned 0. Thanks to Michael
Vidrevich for spotting this and providing a test case.
2010-05-20: Stuart Caie <kyzer@4u.net>
* system.h: It turns out no configure.ac tests are needed to
decide between __func__ and __FUNCTION__, so I put the standard
one (__func__) back into the D() macro, along with some
special-case ifdefs for old versions of GCC.
* lzxd_static_init(): Removed function in favour of static const
tables. Jorge Lodos thinks it causes multithreading problems, I
disagree. However, there are speed benefits to declaring the
tables as static const.
* cabd_init_decomp(): Fixed code which never runs but would write
to a null pointer if it could. Changed it to an assert() as it
will only trip if someone rewrites the internals of cabd.c. Thanks
to Jorge Lodos for finding it.
* inflate(): Fixed an off-by-one error: if the LITERAL table
emitted code 286, this would read one byte past the end of
lit_extrabits[]. Thanks to Jorge Lodos for finding it.
2010-05-06: Stuart Caie <kyzer@4u.net>
* test/cabrip.c, test/chminfo.c: add fseeko() support
2009-06-01: Stuart Caie <kyzer@4u.net>
* README: clarify the extended license terms
* doc, Makefile.am: make the doxygen makefile work when using
an alternate build directory
2006-09-20: Stuart Caie <kyzer@4u.net>
* system.h: I had a choice of adding more to configure.ac to
test for __func__ and __FUNCTION__, or just removing __FUNCTION__
from the D() macro. I chose the latter.
* Makefile.am: Now the --enable-debug in configure will actually
apply -DDEBUG to the sources.
2006-09-20: Stuart Caie <kyzer@4u.net>
* qtmd_decompress(): Fixed a major bug in the QTM decoder, as
reported by Tomasz Kojm last year. Removed the restriction on
window sizes as a result. Correctly decodes the XLVIEW cabinets.
2006-08-31: Stuart Caie <kyzer@4u.net>
* lzxd_decompress(): Two major bugs fixed. Firstly, the R0/R1/R2
local variables weren't set to 1 after lzxd_reset_state().
Secondly, the LZX decompression stream can sometimes become
odd-aligned (after an uncompressed block) and the next 16 bit
fetch needs to be split across two input buffers, ENSURE_BITS()
didn't cover this case. Many thanks to Igor Glucksmann for
discovering both these bugs.
2005-06-30: Stuart Caie <kyzer@4u.net>
* cabd_search(): fixed problems with searching files > 4GB for
cabinets.
2005-06-23: Stuart Caie <kyzer@4u.net>
* qtmd_init(): The QTM decoder is broken for QTM streams with a
window size less than the frame size. Until this is fixed, fail
to initialise QTM window sizes less than 15. Thanks to Tomasz Kojm
for finding the bug.
2005-03-22: Stuart Caie <kyzer@4u.net>
* system.h: now undefs "read", as the latest glibc defines read()
as a macro which messes everything up. Thanks to Ville Skytt for
the update.
2005-03-14: Stuart Caie <kyzer@4u.net>
* test/multifh.c: write an mspack_system implementation that can
handle normal disk files, open file handles, open file descriptors
and raw memory all at the same time.
2005-02-24: Stuart Caie <kyzer@4u.net>
* chmd_read_headers(): avoid infinite loop when chmhs1_ChunkSize is
zero. Thanks to Serge Semashko for the research and discovery.
2005-02-18: Stuart Caie <kyzer@4u.net>
* mspack.h: renamed the "interface" parameter of mspack_version() to
"entity", as interface is a reserved word in C++. Thanks to Yuriy Z
for the discovery.
2004-12-09: Stuart Caie <kyzer@4u.net>
* lzss.h, szdd.h, szddd.h: more work on the SZDD/LZSS design.
2004-06-12: Stuart Caie <kyzer@4u.net>
* lzxd_static_init(): removed write to lzxd_extra_bits[52], thanks
to Nigel Horne from the ClamAV project.
2004-04-23: Stuart Caie <kyzer@4u.net>
* mspack.h: changed 'this' parameters to 'self' to allow compiling in
C++ compilers, thanks to Michal Cihar for the suggestion.
* mspack.h, system.h, mspack.def, winbuild.sh: integrated some changes
from Petr Blahos to let libmspack build as a Win32 DLL.
* chmd_fast_find(): added the first part of this code, and comments
sufficient to finish it :)
2004-04-08 Stuart Caie <kyzer@4u.net>
* test/chminfo.c: added a program for dumping useful data from CHM
files, e.g. index entries and reset tables. I wrote this a while ago
for investigating a corrupt cabinet, but I never committed it.
2004-03-26 Stuart Caie <kyzer@4u.net>
* test/cabd_memory.c: added a new test example which shows an
mspack_system implementation that reads and writes from memory only,
no file I/O. Even the source code has a little cab file embedded in it.
2004-03-10 Stuart Caie <kyzer@4u.net>
* cabd.c: updated the location of the CAB SDK.
* cabd.c: changed a couple of MSPACK_ERR_READ errors not based on
read() failures into MSPACK_ERR_DATAFORMAT errors.
* mszipd_decompress(): repair mode now aborts after writing a
repaired block if the error was a hard error (e.g. read error, out
of blocks, etc)
2004-03-08 Stuart Caie <kyzer@4u.net>
* Makefile.am: now builds and installs a versioned library.
* mszipd.c: completed a new MS-ZIP and inflate implementation.
* system.c: added mspack_version() and committed to a versioned
ABI for the library.
* cabd.c: made mszip repair functionality work correctly.
* cabd.c: now identifies invalid block headers
* doc/: API documentation is now included with the library, not
just on the web.
* chmd.c: fixed error messages and 64-bit debug output.
* chmd.c: now also catches NULL files in section 1.
* test/chmx.c: now acts more like cabextract.
2003-08-29 Stuart Caie <kyzer@4u.net>
* ChangeLog: started keeping a ChangeLog :)
|