5 days agoexport_image.c: allow duplicate image names in source WIM master
Eric Biggers [Tue, 23 Nov 2021 01:55:42 +0000 (17:55 -0800)]
export_image.c: allow duplicate image names in source WIM

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=568.  DISM can
create WIM files containing images with duplicate names, whereas wimlib
enforces unique image names in certain cases such as adding images,
exporting images, and changing image names.  This behavior generally
seems fine, but the "export" check is too strict: an export of "all"
images will fail if the source WIM contains duplicate names.

Fix this by making wimlib_export_image() allow duplicate image names in
the source WIM, provided that they don't collide with image names that
already exist in the destination WIM.

3 months agoconfigure.ac: fix trailing newline issue
Eric Biggers [Tue, 3 Aug 2021 04:53:42 +0000 (21:53 -0700)]
configure.ac: fix trailing newline issue

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=562.
m4_esyscmd() needs to be m4_esyscmd_s(), so that the version string
doesn't get a trailing newline.  It works for me either way, but that's
probably because in autoconf 2.70, AC_INIT started trimming extra
whitespace from its arguments (as per the release notes at
So presumably this fix is needed for older versions of autoconf.

4 months agoconfigure.ac: generate version number from git commit and tags
Eric Biggers [Sat, 10 Jul 2021 22:47:57 +0000 (17:47 -0500)]
configure.ac: generate version number from git commit and tags

This should hopefully make it less confusing when building from the git
repository.  Previously, when doing so the version number would always
be that of the last official release.

4 months agonasm.m4: use AS_MESSAGE_LOG_FD
Eric Biggers [Sat, 10 Jul 2021 22:51:26 +0000 (17:51 -0500)]
nasm.m4: use AS_MESSAGE_LOG_FD

Address the following warning when running autoreconf:

    configure.ac:191: warning: The macro `AC_FD_CC' is obsolete.
    configure.ac:191: You should run autoupdate.
    ./lib/autoconf/general.m4:399: AC_FD_CC is expanded from...
    m4/nasm.m4:4: AC_PROG_NASM is expanded from...
    configure.ac:191: the top level

4 months agov1.13.5-BETA1 v1.13.5-BETA1
Eric Biggers [Sat, 10 Jul 2021 01:26:16 +0000 (20:26 -0500)]

4 months agoREADME.WINDOWS: clarify how to build master branch
Eric Biggers [Sat, 10 Jul 2021 00:56:49 +0000 (17:56 -0700)]
README.WINDOWS: clarify how to build master branch

4 months agoWarn rather than abort if SHA-1 is same but size is different
Eric Biggers [Mon, 5 Jul 2021 06:03:50 +0000 (23:03 -0700)]
Warn rather than abort if SHA-1 is same but size is different

Assertions should only be used for bugs in wimlib, but this scenario can
also happen if there is a SHA-1 collision, or if the SHA-1 hash provided
by the filesystem for a WIM-backed file on Windows is wrong.

5 months agotools/make-windows-release: ensure the headers in tools/windeps/ are used
Eric Biggers [Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)]
tools/make-windows-release: ensure the headers in tools/windeps/ are used

Avoid a build error due to the libxml2 headers not being found.

Previously it worked by chance due to the system headers being used.
This stopped working in Cygwin builds for some reason, though.

5 months agotools/make-windows-release: check existence of config.log before grepping it
Eric Biggers [Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)]
tools/make-windows-release: check existence of config.log before grepping it

Avoid a misleading log message.

5 months agowin32: update WOF ioctl definitions
Eric Biggers [Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)]
win32: update WOF ioctl definitions

Use the "official" Microsoft struct and field names, and only define
things when they aren't already defined (since some of them were
recently added to MinGW's winioctl.h, causing build errors).

5 months agowin32: only define FSCTL_SET_PERSISTENT_VOLUME_STATE if not yet defined
Eric Biggers [Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)]
win32: only define FSCTL_SET_PERSISTENT_VOLUME_STATE if not yet defined

The MinGW headers define this (and the related struct and constant) now,
which is causing a build error.

Also use CTL_CODE() rather than a raw number.

5 months agoREADME.WINDOWS: fix category of p7zip
Eric Biggers [Tue, 29 Jun 2021 07:42:11 +0000 (00:42 -0700)]
README.WINDOWS: fix category of p7zip

7 months agov1.13.4 v1.13.4
Eric Biggers [Mon, 19 Apr 2021 04:16:34 +0000 (21:16 -0700)]

7 months agov1.13.4-BETA2
Eric Biggers [Wed, 7 Apr 2021 04:31:48 +0000 (21:31 -0700)]

7 months agoAdd support for a data recovery mode
Eric Biggers [Wed, 7 Apr 2021 04:31:48 +0000 (21:31 -0700)]
Add support for a data recovery mode

Add support for extracting file data even if it is corrupted (i.e. if
its hash doesn't match or some of its chunks can't be decompressed).

This isn't recommended for general use, but it could be useful for
recovering data from a corrupted WIM archive.

7 months agov1.13.4-BETA1
Eric Biggers [Fri, 2 Apr 2021 04:14:20 +0000 (21:14 -0700)]

7 months agoFix slow progress updating for wimsplit
Eric Biggers [Fri, 2 Apr 2021 04:07:53 +0000 (21:07 -0700)]
Fix slow progress updating for wimsplit

wimsplit only prints a progress message when starting each WIM part.
That could be very infrequently since each part could be gigabytes.

Fix it to update the progress regularly as data is written, like the
other wimlib-imagex commands do.

This required changing the library to report
WIMLIB_PROGRESS_MSG_WRITE_STREAMS messages from wimlib_split() and
include the completed compressed size in them.

Reported at https://www.reddit.com/r/pcmasterrace/comments/hagu4k/wimlibimagex_split_stuck_at_0

13 months agov1.13.3 v1.13.3
Eric Biggers [Tue, 27 Oct 2020 03:54:00 +0000 (20:54 -0700)]

13 months agowin32_replacements.c: fix handle closing in win32_wglob()
Eric Biggers [Tue, 27 Oct 2020 03:17:02 +0000 (20:17 -0700)]
win32_replacements.c: fix handle closing in win32_wglob()

The handle returned by FindFirstFileW() needs to be closed by
FindClose(), not by CloseHandle().

This is a very old bug, which presumably wasn't noticed before because
ordinarily it just leaked the handle.  However, this bug caused a SEH
exception when wimlib was run under a debugger.

15 months agoCOPYING: clarify the license
Eric Biggers [Sun, 23 Aug 2020 19:37:12 +0000 (12:37 -0700)]
COPYING: clarify the license

Some of the language in COPYING is potentially unclear.  For example,
there is some ambiguity in when each license option of GPL and LGPL is
allowed.  Clarify the language.

Note, this commit isn't intended to actually change the license at all.
It just clarifies what I intended.

17 months agoConsistently use forums as bug report location
Eric Biggers [Fri, 5 Jun 2020 01:36:14 +0000 (18:36 -0700)]
Consistently use forums as bug report location

17 months agowin32_apply: relax bootloader compression blacklist
Eric Biggers [Fri, 5 Jun 2020 01:21:57 +0000 (18:21 -0700)]
win32_apply: relax bootloader compression blacklist

At some point the Windows bootloader started supporting all system
compression formats, not just XPRESS4K.

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=444

17 months agoREADME.WINDOWS: fix the Cygwin package list
Eric Biggers [Fri, 5 Jun 2020 00:49:40 +0000 (17:49 -0700)]
README.WINDOWS: fix the Cygwin package list

The "mingw64-i686-pkg-config" and "mingw64-x86_64-pkg-config" packages
have been replaced by just "pkg-config".

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=533#p1225

17 months agov1.13.3-BETA1
Eric Biggers [Tue, 2 Jun 2020 04:30:08 +0000 (21:30 -0700)]

17 months agowin32_capture: avoid unnecessary fallback to recursive scan
Eric Biggers [Tue, 2 Jun 2020 04:26:04 +0000 (21:26 -0700)]
win32_capture: avoid unnecessary fallback to recursive scan

When doing the fast MFT scan (via FSCTL_QUERY_FILE_LAYOUT) and we find a
directory that needs to fall back to the standard scan, we actually only
need to fall back for the directory itself -- not also its children.
Optimize things accordingly.

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=533

18 months agov1.13.2 v1.13.2
Eric Biggers [Sun, 24 May 2020 18:22:36 +0000 (11:22 -0700)]

18 months agowimboot.c: avoid -Waddress-of-packed-member warning
Eric Biggers [Sun, 24 May 2020 18:22:36 +0000 (11:22 -0700)]
wimboot.c: avoid -Waddress-of-packed-member warning

18 months agoUpdate libxml to 2.9.10 for Windows binaries
Eric Biggers [Sun, 24 May 2020 18:22:36 +0000 (11:22 -0700)]
Update libxml to 2.9.10 for Windows binaries

18 months agoRemove obsolete Linux packaging files
Eric Biggers [Sun, 24 May 2020 18:22:36 +0000 (11:22 -0700)]
Remove obsolete Linux packaging files

There are now official Debian and Fedora packages for wimlib.  So the
in-tree packaging files are redundant.  Also I haven't tested them in a
long time, so there's a good chance they don't work properly anymore.

18 months agoUse memcpy() for unaligned accesses
Eric Biggers [Fri, 22 May 2020 05:35:29 +0000 (22:35 -0700)]
Use memcpy() for unaligned accesses

For unaligned memory accesses, with modern compilers memcpy() is
compiled just as efficiently as __attribute__((packed)).  This also
avoids using a nonstandard extension and potentially running into the
gcc 10 bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94994.

2 years agoFix some typos
Eric Biggers [Sun, 25 Aug 2019 00:38:43 +0000 (17:38 -0700)]
Fix some typos

2 years agoupdate_image.c: check malloc return value
Eric Biggers [Fri, 26 Jul 2019 05:11:33 +0000 (22:11 -0700)]
update_image.c: check malloc return value

2 years agoAvoid gcc warnings with -Waddress-of-packed-member
Eric Biggers [Fri, 26 Jul 2019 05:11:33 +0000 (22:11 -0700)]
Avoid gcc warnings with -Waddress-of-packed-member

- Remove unnecessary packed attributes.
- Access a packed structure directly rather than via a separate pointer.

2 years agomkwinpeimg: syslinux modules may be in /usr/share/syslinux
Jiri Slaby [Thu, 18 Jul 2019 06:22:33 +0000 (08:22 +0200)]
mkwinpeimg: syslinux modules may be in /usr/share/syslinux

On openSUSE...

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2 years agov1.13.1 v1.13.1
Eric Biggers [Tue, 7 May 2019 02:29:00 +0000 (19:29 -0700)]

2 years agov1.13.1-BETA1
Eric Biggers [Sun, 14 Apr 2019 06:21:42 +0000 (23:21 -0700)]

2 years agolcpit_matchfinder: fix limiting nice_match_len
Eric Biggers [Sun, 14 Apr 2019 06:21:42 +0000 (23:21 -0700)]
lcpit_matchfinder: fix limiting nice_match_len

The "normal" mode of the lcp-interval tree matchfinder supports finding
matches up to LCP_MAX bytes.  The "huge" mode, which is needed on
buffers larger than 64 MiB, supports up to HUGE_LCP_MAX bytes.
nice_match_len must be limited to the appropriate one of these values.

But nice_match_len is limited by lcpit_matchfinder_init().  That's
wrong, because it only knows whether huge mode *might* be used later,
based on max_bufsize.  Which mode to use is actually decided on a
buffer-by-buffer basis by lcpit_matchfinder_load_buffer().

Thus, limit nice_match_len in lcpit_matchfinder_load_buffer() instead.

This fixes a crash or incorrect output during LZMS compression with a
compression level > 50 and a chunk size > 64 MiB.

2 years agowlfuzz: improve compression parameter generation
Eric Biggers [Sun, 14 Apr 2019 06:21:42 +0000 (23:21 -0700)]
wlfuzz: improve compression parameter generation

- Sometimes choose LZMS chunk sizes > 64 MiB
- Choose LZMS more often
- Other cleanups

3 years agov1.13.0 v1.13.0
Eric Biggers [Fri, 23 Nov 2018 23:35:07 +0000 (15:35 -0800)]

3 years agoUpdate libxml to 2.9.8 for Windows binaries
Eric Biggers [Fri, 23 Nov 2018 23:35:07 +0000 (15:35 -0800)]
Update libxml to 2.9.8 for Windows binaries

3 years agowlfuzz: compare xattrs on Windows
Eric Biggers [Fri, 23 Nov 2018 23:35:07 +0000 (15:35 -0800)]
wlfuzz: compare xattrs on Windows

3 years agoimagex: warn that --update-of is unreliable on Windows
Eric Biggers [Tue, 11 Sep 2018 03:11:31 +0000 (20:11 -0700)]
imagex: warn that --update-of is unreliable on Windows

3 years agowimappend: with --create, ignore --update-of nonexistent target file
Eric Biggers [Tue, 11 Sep 2018 02:58:10 +0000 (19:58 -0700)]
wimappend: with --create, ignore --update-of nonexistent target file

3 years agoRemove Arch Linux PKGBUILD
Eric Biggers [Sat, 21 Jul 2018 20:10:41 +0000 (13:10 -0700)]
Remove Arch Linux PKGBUILD

There's now an official Arch Linux package for wimlib.
So the PKGBUILD file in-tree is redundant.

3 years agowimappend: add --create option to create WIM file if needed
Eric Biggers [Sat, 21 Jul 2018 19:34:19 +0000 (12:34 -0700)]
wimappend: add --create option to create WIM file if needed

3 years agowimextract: allow specifying listfile on stdin
Eric Biggers [Sat, 21 Jul 2018 18:38:08 +0000 (11:38 -0700)]
wimextract: allow specifying listfile on stdin

3 years agoMake absolute ExclusionException patterns include ancestor directories
Eric Biggers [Sat, 21 Jul 2018 16:27:22 +0000 (09:27 -0700)]
Make absolute ExclusionException patterns include ancestor directories

3 years agoimagex: make sure we still use wgetopt_long_only() on Windows
Eric Biggers [Sat, 21 Jul 2018 16:27:22 +0000 (09:27 -0700)]
imagex: make sure we still use wgetopt_long_only() on Windows

3 years agoFix building on NetBSD
Eric Biggers [Fri, 20 Jul 2018 07:38:56 +0000 (00:38 -0700)]
Fix building on NetBSD

3 years agosplit.c: fix finding extension of first split WIM part
Eric Biggers [Wed, 28 Feb 2018 03:31:58 +0000 (19:31 -0800)]
split.c: fix finding extension of first split WIM part

Silly old bug: wimlib_split() considered the first dot in the SWM path
to begin the filename extension.  But of course, there can be other dots
in the path; we need to look for the last dot in the last component.

3 years agoUpdate NEWS
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
Update NEWS

3 years agowin32_capture: recognize STATUS_NOT_SUPPORTED (fixes for WinXP)
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
win32_capture: recognize STATUS_NOT_SUPPORTED (fixes for WinXP)

3 years agoUpdate winpthreads to 5.0.3 for Windows binaries
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
Update winpthreads to 5.0.3 for Windows binaries

3 years agoUpdate libxml to 2.9.7 for Windows binaries
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
Update libxml to 2.9.7 for Windows binaries

3 years agowimlib-imagex: add --include-integrity option
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
wimlib-imagex: add --include-integrity option

The --check option currently does two things: verify the integrity table
of the input WIM(s), and include an integrity table in the output
WIM(s).  Some users would like to do the latter only, especially if
there are large input WIM(s).

Add an option --include-integrity which does this.

3 years agowimlib-imagex: try harder to optimize out opening template WIM
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
wimlib-imagex: try harder to optimize out opening template WIM

As an optimization, 'wimcapture' and 'wimappend' don't separately open
the template WIM for --update-of if no filename is specified in that
option, which makes it default to either the single base WIM
(--delta-from), or the WIM being appended to.

Extend that optimization to cases where the filename is specified in
--update-of and it exactly matches the filename of the WIM being
appended to or any of the base WIMs.

3 years agoImprove explanation for pipable WIM pre-write checksumming
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
Improve explanation for pipable WIM pre-write checksumming

3 years agoMake stream_hash() return NULL for unhashed streams
Eric Biggers [Sun, 21 Jan 2018 21:47:10 +0000 (13:47 -0800)]
Make stream_hash() return NULL for unhashed streams

Otherwise it will return a bogus value from the union with ->back_inode
and ->back_stream_id.  Most callers ensured this cannot happen, but a
couple did not.  It should be explicitly prevented or handled.

3 years agoCapture and apply extended attributes on Windows
Eric Biggers [Sun, 21 Jan 2018 21:47:09 +0000 (13:47 -0800)]
Capture and apply extended attributes on Windows

DISM recently started supporting capturing and applying xattrs on
Windows (though, it is broken when applying multiple xattrs per file).
Make wimlib support the same, using the same on-disk format.  Unlike
DISM it is on by default, not controlled by an option, since there
doesn't seem to be a good reason to make it an option.

Also deprecate the tagged item wimlib was using to store xattrs on Linux
and switch over to the format used by WIMGAPI to store xattrs on
Windows, so that new WIM images use the same xattr format on both
platforms.  One caveat is that on Linux XATTR_SIZE_MAX is 65536 whereas
in the new WIM tagged item format we can only store up to 65535 bytes.
That is unlikely to matter though.

As future work, the NTFS-3G capture and apply backends should be updated
to support xattrs too.

3 years agoAllow retrieving PACKAGE_VERSION from the library
Eric Biggers [Sun, 21 Jan 2018 21:47:09 +0000 (13:47 -0800)]
Allow retrieving PACKAGE_VERSION from the library

Otherwise the output of 'wimlib-imagex --version' for beta versions
would be confusing.

4 years agowimlib-imagex: print version of library being used
Eric Biggers [Wed, 20 Sep 2017 02:53:19 +0000 (19:53 -0700)]
wimlib-imagex: print version of library being used

4 years agov1.12.0 v1.12.0
Eric Biggers [Sat, 29 Jul 2017 20:46:20 +0000 (13:46 -0700)]

4 years agowin32_apply: bail if paths are too long for a UNICODE_STRING
Eric Biggers [Sat, 29 Jul 2017 20:39:28 +0000 (13:39 -0700)]
win32_apply: bail if paths are too long for a UNICODE_STRING

4 years agowin32_common: fix windows_msg() with long messages
Eric Biggers [Sat, 29 Jul 2017 20:20:16 +0000 (13:20 -0700)]
win32_common: fix windows_msg() with long messages

4 years ago1.12.0-BETA2
Eric Biggers [Sun, 16 Jul 2017 07:16:59 +0000 (00:16 -0700)]

4 years agowimlib-imagex: add --quiet option
Eric Biggers [Sun, 16 Jul 2017 06:57:10 +0000 (23:57 -0700)]
wimlib-imagex: add --quiet option

4 years agolzx_decompress: redeclare input_bitstream above main loop
Eric Biggers [Sun, 16 Jul 2017 06:26:33 +0000 (23:26 -0700)]
lzx_decompress: redeclare input_bitstream above main loop

4 years agounaligned: use may_alias attribute
Eric Biggers [Sun, 16 Jul 2017 06:26:33 +0000 (23:26 -0700)]
unaligned: use may_alias attribute

gcc7 miscompiles the "undo" mode of translate_if_needed() in
lzms_common.c because the get_unaligned_le16() was incorrectly being
moved before the put_unaligned_le32().  Fix it by marking the special
"unaligned" structs with the may_alias attribute.

4 years agoUse dynamically-sized path buffer when scanning files
Eric Biggers [Sun, 16 Jul 2017 06:26:33 +0000 (23:26 -0700)]
Use dynamically-sized path buffer when scanning files

This is needed to guarantee that no buffer overflow can occur when
scanning a deep directory structure.  The new way also avoids using
PATH_MAX, which fixes a build error on systems that don't define it.

4 years agomkwinpeimg: syslinux modules may be in /usr/lib/syslinux/modules/bios
Eric Biggers [Mon, 3 Jul 2017 21:07:09 +0000 (14:07 -0700)]
mkwinpeimg: syslinux modules may be in /usr/lib/syslinux/modules/bios

4 years agoupdate_image.c: Ignore Windows 10 Recycle Bin directories.
Mike Swanson [Sun, 4 Jun 2017 22:35:34 +0000 (15:35 -0700)]
update_image.c: Ignore Windows 10 Recycle Bin directories.

On Windows 10 (possibly earlier versions?), the \$RECYCLE.BIN or
\$Recycle.Bin directories are created in the root of a volume.
Both case variants here so capture of an NTFS volume from Linux
should work, but wouldn't make a difference when capturing on

4 years ago1.12.0-BETA1
Eric Biggers [Wed, 19 Apr 2017 06:58:03 +0000 (23:58 -0700)]

4 years agotests: test capturing+applying file with negative UNIX timestamp
Eric Biggers [Wed, 19 Apr 2017 06:58:03 +0000 (23:58 -0700)]
tests: test capturing+applying file with negative UNIX timestamp

... and start comparing mtime in tree-cmp, and fix cases where return
codes in scripts were being ignored by use of '&&'.

4 years agowlfuzz: compare timestamps
Eric Biggers [Wed, 19 Apr 2017 06:58:03 +0000 (23:58 -0700)]
wlfuzz: compare timestamps

4 years agoImproved year 2038 safety
Eric Biggers [Wed, 19 Apr 2017 06:58:03 +0000 (23:58 -0700)]
Improved year 2038 safety

Make wimlib on 32-bit Windows year 2038 safe by doing the following:

- Build both the library and program with 64-bit time_t, being careful
  to avoid changing the timespec struct exposed in the API.
- Update wimlib's API to include an extended seconds field in
  wimlib_dir_entry for each timestamp, and set it when tv_sec is 32-bit.
- When needing the current time, call GetSystemTimeAsFileTime() instead
  of MinGW's gettimeofday().

This also has the advantage that due to switching to the 64-bit time_t
functions, 32-bit wimlib-imagex.exe now prints timestamps prior to year
1970 correctly.

Unfortunately, despite the API improvement, we cannot at this time make
wimlib fully Y2038-safe on 32-bit UNIX, due to lack of OS support.

4 years agotimestamp.c: correctly convert negative UNIX timestamps
Eric Biggers [Wed, 19 Apr 2017 06:58:03 +0000 (23:58 -0700)]
timestamp.c: correctly convert negative UNIX timestamps

4 years agontfs-3g_apply.c: note bugs fixed in NTFS-3G version 2017.3.23
Eric Biggers [Sat, 8 Apr 2017 17:48:04 +0000 (10:48 -0700)]
ntfs-3g_apply.c: note bugs fixed in NTFS-3G version 2017.3.23

4 years agoavl_tree.h: avoid bad function pointer cast
Eric Biggers [Sun, 29 Jan 2017 05:18:21 +0000 (21:18 -0800)]
avl_tree.h: avoid bad function pointer cast

Casting the type of the 'cmp' function, while under normal circumstances
compiled correctly, was not technically correct and was not compatible
with some control flow integrity (CFI) implementations.

4 years agoAdd tools/clang-build-with-cfi
Eric Biggers [Sat, 28 Jan 2017 23:14:23 +0000 (15:14 -0800)]
Add tools/clang-build-with-cfi

4 years agov1.11.0 v1.11.0
Eric Biggers [Wed, 18 Jan 2017 05:24:53 +0000 (21:24 -0800)]

4 years agoexamples/compressfile.c: add back colon that got deleted
Eric Biggers [Wed, 18 Jan 2017 04:32:54 +0000 (20:32 -0800)]
examples/compressfile.c: add back colon that got deleted

4 years agotagged_items.c: statically verify size of tagged item header
Eric Biggers [Wed, 18 Jan 2017 04:32:54 +0000 (20:32 -0800)]
tagged_items.c: statically verify size of tagged item header

4 years agoxattr.h: statically verify size of xattr header
Eric Biggers [Wed, 18 Jan 2017 04:32:54 +0000 (20:32 -0800)]
xattr.h: statically verify size of xattr header

4 years agolzx_compress: optimize storing information in lzx_sequence
Eric Biggers [Sun, 15 Jan 2017 21:34:36 +0000 (13:34 -0800)]
lzx_compress: optimize storing information in lzx_sequence

Pack the literal run length and match length ourselves instead of using
bitfields, and store the actual match length instead of the adjusted
match length.  Also make matchlen=0 represent end-of-block, and store
the full main symbol, not just the match header.

4 years agoDon't generate GUID in wimlib_create_new_wim()
Eric Biggers [Sun, 15 Jan 2017 01:00:13 +0000 (17:00 -0800)]
Don't generate GUID in wimlib_create_new_wim()

It's not necessary to generate a GUID in wimlib_create_new_wim() because
one is generated later by wimlib_write(), and nothing seems to assume
that a WIMStruct not yet backed by a file has a valid GUID.  This saves
a call to get_random_bytes().  Also remove some unnecessary
initializations to 0.

4 years agolzx_compress: fix corruption with long literal run
Eric Biggers [Sat, 14 Jan 2017 08:56:39 +0000 (00:56 -0800)]
lzx_compress: fix corruption with long literal run

The last round of updates to the LZX compressor made it start being able
to use larger blocks, up to ~100KB.  Unfortunately it was overlooked
that this allows literal runs > 65535 bytes while in one place the
length of a literal run was still being stored in a u16.  Therefore, on
incompressible input data this could be wrapped around, causing
incorrect compression.  Fix this by enlarging the variable.

4 years agowimappend: support --delta-from option
Eric Biggers [Fri, 13 Jan 2017 04:04:18 +0000 (20:04 -0800)]
wimappend: support --delta-from option

--delta-from was previously only supported by wimcapture.  But it is
trivial to make wimappend support it too, and it could be useful.

4 years agohc_matchfinder: use well-defined initialization of best_matchptr
Eric Biggers [Sun, 8 Jan 2017 06:34:32 +0000 (22:34 -0800)]
hc_matchfinder: use well-defined initialization of best_matchptr

The initial value of best_matchptr is not truly used, but since we do
always compute 'in_next - best_matchptr', assign an initial value which
avoids undefined behavior.

4 years agounix_apply.c: use #ifdef HAVE_XATTR_SUPPORT, not #if HAVE_XATTR_SUPPORT
Eric Biggers [Sun, 8 Jan 2017 00:05:21 +0000 (16:05 -0800)]
unix_apply.c: use #ifdef HAVE_XATTR_SUPPORT, not #if HAVE_XATTR_SUPPORT

4 years agoextract.c: recommend --unix-data mode when appropriate
Eric Biggers [Sat, 7 Jan 2017 23:08:09 +0000 (15:08 -0800)]
extract.c: recommend --unix-data mode when appropriate

4 years agotagged_items: rename inode_set_tagged_data() to inode_set_tagged_item()
Eric Biggers [Sat, 7 Jan 2017 22:35:07 +0000 (14:35 -0800)]
tagged_items: rename inode_set_tagged_data() to inode_set_tagged_item()

(for consistency with inode_get_tagged_item())

4 years agowimdir: make documention correctly reflect that IMAGE is optional
Eric Biggers [Sat, 7 Jan 2017 22:35:06 +0000 (14:35 -0800)]
wimdir: make documention correctly reflect that IMAGE is optional

4 years agowimmount.1: mention long forms
Eric Biggers [Sat, 7 Jan 2017 22:35:06 +0000 (14:35 -0800)]
wimmount.1: mention long forms

4 years agowimlib-imagex: fix recommendation to read PDF documentation
Eric Biggers [Sat, 7 Jan 2017 22:35:06 +0000 (14:35 -0800)]
wimlib-imagex: fix recommendation to read PDF documentation

Recommend wimFOO.pdf instead of wimlib-imagex-FOO.pdf.  (Also `man
wimFOO` instead of `man wimlib-imagex-FOO'.)

4 years agov1.11.0-BETA5
Eric Biggers [Mon, 2 Jan 2017 00:19:25 +0000 (18:19 -0600)]

4 years agowlfuzz: sometimes generate security.capability xattrs
Eric Biggers [Sun, 1 Jan 2017 23:44:19 +0000 (17:44 -0600)]
wlfuzz: sometimes generate security.capability xattrs

4 years agounix_apply.c: fix applying security xattrs
Eric Biggers [Sun, 1 Jan 2017 23:44:19 +0000 (17:44 -0600)]
unix_apply.c: fix applying security xattrs

4 years agoDocumentation updates, mainly to the man pages
Eric Biggers [Sun, 1 Jan 2017 23:44:18 +0000 (17:44 -0600)]
Documentation updates, mainly to the man pages

- Use short command names like wimFOO instead of wimlib-imagex FOO
- Lots of other small improvements

4 years agov1.11.0-BETA4
Eric Biggers [Wed, 28 Dec 2016 04:36:28 +0000 (22:36 -0600)]

4 years agowlfuzz: generate and compare extended attributes
Eric Biggers [Tue, 27 Dec 2016 23:24:56 +0000 (17:24 -0600)]
wlfuzz: generate and compare extended attributes