<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib, branch v1.0.2</title>
<subtitle>A new set of tools and libraries for working with SquashFS images</subtitle>
<id>https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.0.2</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.0.2'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2020-09-03T16:28:09+00:00</updated>
<entry>
<title>Fix integer bounds checking in GNU tar sparse format 1.0 parser</title>
<updated>2020-09-03T16:28:09+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-03T15:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c6d289ab9e604369c25ed2c766842318f74e9256'/>
<id>urn:sha1:c6d289ab9e604369c25ed2c766842318f74e9256</id>
<content type='text'>
 - Make sure the file actually has that many records before trying
   to read one and fail if not.
 - Use the helper macros for size_t overflow checking instead of
   assuming size_t == uint64_t.
 - Impose a "reasonable" upper bound on the number of data segments
   and insist that there is at least one entry.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix nonexistant gnu tar sparse format 1.0 support</title>
<updated>2020-09-02T09:19:11+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-02T09:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=84ff0984bb5b471d0b4cbc0b0fca156c29273bf5'/>
<id>urn:sha1:84ff0984bb5b471d0b4cbc0b0fca156c29273bf5</id>
<content type='text'>
Contrary to previous claims, support for the GNU tar sparse format 1.0
was missing entirely (the newest of their 3 different sparse mapping
formats). This oversight wasn't caught, because the unit test was
compiling the wrong source file and tar2sqfs had no problem processing
the test file because it is still a valid POSIX-ish tar archive (but
the sparse part was missing and the mapping embedded in the file).

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix tree node path generation for detached sub trees</title>
<updated>2020-08-26T08:55:21+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-08-26T08:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=ce8d6217fe7ed4d40af23242be4eaef8e53385a3'/>
<id>urn:sha1:ce8d6217fe7ed4d40af23242be4eaef8e53385a3</id>
<content type='text'>
The function sqfs_tree_node_get_path is used in several places within
rdsquashfs to produce a path for a tree node, either when describing
the file system, or when unpacking it. Unpacking can be done on
sub-trees as well as the entire tree, in which case the root of the
sub-tree has its parent pointer removed, so the full path terminates
at the new root.

This works with directories, since they receive special case handling
anyway, but fails if the sub-tree to unpack is only a single file
because the sqfs_tree_node_get_path function assumes that we are at the
tree root and returns "/" as a path, which gets normalized to "".

This commit adds a workaround to the function to simply use the nodes
name (if available) in that case instead.

The describe case in rdsquashfs is unaffacted, since it always starts
at the root. Likewise, the sqfs2tar case should also be unaffacted,
since it already employs special case handling for the [sub] tree root
node.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix libtar treatment of link targets that fill the header field</title>
<updated>2020-08-16T11:03:17+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-08-16T11:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=80fe7f8d5b7dd51c97dd66152e255173f9a516dd'/>
<id>urn:sha1:80fe7f8d5b7dd51c97dd66152e255173f9a516dd</id>
<content type='text'>
The tar header has a 100 byte field for symlink and hard link targets.
If the target is longer than 100 bytes, an extension header has to be
used.

However, it is perfectly valid to fill all 100 bytes to the brim
without adding a null terminator. In case of a symlink, this can
result in garbage link targets, while for hard links it results in
an immediate error since the target cannot be resolved later on.

This commit attempts to fix the problem by replacing the strdup of
the link target with an strndup that copies at most the size of the
target header field.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix block processor single block with don't fragment flag bug</title>
<updated>2020-08-11T22:25:34+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-08-10T09:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=18275733975c23b93419fbce7ca3105e6638786d'/>
<id>urn:sha1:18275733975c23b93419fbce7ca3105e6638786d</id>
<content type='text'>
This commit fixes a bug where the block processor state machine would
not add the "last block" flag if there is only one not entirely filled
block and the "don't fragment" flag is set. If the flag isn't set, the
inode start block position is not updated and points to the beginning
of the image instead.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: move zlib/lz4 code from lib/sqfs/comp/ to lib/</title>
<updated>2020-08-04T17:27:42+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-07-26T13:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=959fde579e07836b73438e86cd58ba04657014f6'/>
<id>urn:sha1:959fde579e07836b73438e86cd58ba04657014f6</id>
<content type='text'>
The source code of a modified liblz4 and zlib are included with the
option to compile them into libsquashfs if they are not available on
the system.

So far, the source code was included directly in the compressor sub
directory within libsqsuashfs. This commit moves the libraries out
into the lib directory.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: xattr reader: read the header after seaking to an OOL value</title>
<updated>2020-07-29T11:31:08+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-07-29T11:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=06972b6b45ff32090359d3b272f197e4cd9fb1e7'/>
<id>urn:sha1:06972b6b45ff32090359d3b272f197e4cd9fb1e7</id>
<content type='text'>
If an xattr value is stored OOL, the value actually holds an 8 byte
reference to another, previously stored value. This reference points
to the header that we need to read to know the actual size of the
value before reading it, not the value itself, so after reading the
reference and seeking to it, the xattr reader needs to read the actual
header.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix block bounds checking in libsquashfs data reader</title>
<updated>2020-06-20T17:18:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-06-20T16:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=94cfa86b56792e8b95e3807c8174e348d70eac59'/>
<id>urn:sha1:94cfa86b56792e8b95e3807c8174e348d70eac59</id>
<content type='text'>
Instead of doing the fragile size comparison in both loops, simply
bail from the function if offset is out of bounds, clamp the size
to the available range of the file and abail if it is zero.

As a result, a lot of checks can be removed and the function will not
return data beyond EOF.

This problem occoured with files that have a short last block instead
of a fragment.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: don't include alloca.h on systems that don't provide this header</title>
<updated>2020-06-13T14:09:40+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-06-13T14:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=fcbf4c346c8a9b88679983614218e90a44fe8f2a'/>
<id>urn:sha1:fcbf4c346c8a9b88679983614218e90a44fe8f2a</id>
<content type='text'>
This commit fixes a build issue on BSD based systems, where alloca
is defined in stdlib.h and there is no such thing as "alloca.h".

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Bump the so version number for libsquashfs</title>
<updated>2020-06-13T02:08:14+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-06-13T01:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=1b7368d88262455d3618774aed5df350db337386'/>
<id>urn:sha1:1b7368d88262455d3618774aed5df350db337386</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
