<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib, branch v1.0.6</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.6</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.0.6'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2021-07-21T08:01:39+00:00</updated>
<entry>
<title>Fix libsquashfs directory writer size accounting</title>
<updated>2021-07-21T08:01:39+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-07-21T07:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c2aac9df8b5b29780bfc4a32fd38facf6a9b84a6'/>
<id>urn:sha1:c2aac9df8b5b29780bfc4a32fd38facf6a9b84a6</id>
<content type='text'>
The squashfs readdir() implementation in the Linux kernel returns
non-existing "." and ".." entries for offsets 0 and 1, and after
that reads from disk. For convenience, it was decided to store an
off-by-3 value on disk instead of doing complex primary school math
to adjust for this. This didn't show up until now, because the kernel
implementation trusts the value from the directory header more than
the actual size in the inode and happily reads 3 more than the inode
would allow it to. This only showed up with 7-zip which subtracts 3
from the size and expects the result to be exact and bails if the
directory headers suggest otherwise.

And yes, I did consider making a "Holy Hand Granade of Antioch"
reference, but consciously decided not to.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix printf format specifiers used for generating tarballs</title>
<updated>2021-07-09T18:00:36+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-07-09T16:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=270fac93b9bdc2da16126817d48ce109ef9073bb'/>
<id>urn:sha1:270fac93b9bdc2da16126817d48ce109ef9073bb</id>
<content type='text'>
When processing files &gt; 4G, using "%o" truncates the result and the
tarball is not readable. This should have been discovered when
auto-patching the printf format specifiers, but a cast was added
instead and the issue was overlooked.

This commit replaces the down-cast and printf format specifiers.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add default cases for every switch block</title>
<updated>2021-06-25T15:49:11+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T12:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c578e5ca80370c9fc832f4a535bd8444971759e0'/>
<id>urn:sha1:c578e5ca80370c9fc832f4a535bd8444971759e0</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove casual un-const casting in various places</title>
<updated>2021-06-25T15:48:49+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-24T14:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a32b5a9c793e4f4a4577837b73e783386842db02'/>
<id>urn:sha1:a32b5a9c793e4f4a4577837b73e783386842db02</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libsquashfs: get rid of potentially unaligned access and VLAs</title>
<updated>2021-06-25T15:37:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T12:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3f887a1acc6129210d1ad4a484842bd411a85c7a'/>
<id>urn:sha1:3f887a1acc6129210d1ad4a484842bd411a85c7a</id>
<content type='text'>
The same problem with the meta data header again, 16 bit read from
a buffer: copy the buffer data into a 16 bit variable instead of
casting to something potentially unaligned.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libcommon: remove potentially un-aligned access in LZO compressor</title>
<updated>2021-06-25T15:37:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T11:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=f09d9d3cbbb39f94fe9a43b0d90c370d33beafb2'/>
<id>urn:sha1:f09d9d3cbbb39f94fe9a43b0d90c370d33beafb2</id>
<content type='text'>
When accessing the 16 bit header, don't cast the buffer pointer to an
uint16_t pointer, the result might not be aligned propperly. Instead
memcpy to and from an uint16_t.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libfstree: guard against link count and inode number overflow</title>
<updated>2021-06-25T15:37:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-24T12:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=9ba4d7a122dfc4e3e03d0112ad03115b3065a238'/>
<id>urn:sha1:9ba4d7a122dfc4e3e03d0112ad03115b3065a238</id>
<content type='text'>
If the hard link counter or the inode number counter overflow the
maximum representable value (for SquashFS 16 bit and 32 bit
respecitively), abort with an error message.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: libsquashfs: add sqfs_free() function</title>
<updated>2021-06-07T12:35:40+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-04-08T10:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=7a2e1a0a7a575c64eaf050c8ec08e5b36e4acfad'/>
<id>urn:sha1:7a2e1a0a7a575c64eaf050c8ec08e5b36e4acfad</id>
<content type='text'>
On systems like Windows, the dynamic library and applications can
easily end up being linked against different runtime libraries, so
applications cannot be expected to be able to free() any malloc'd
pointer that the library returns.

This commit adds an sqfs_free function so the application can pass
pointers back to the library to call the correct free() implementation.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libsquashfs: fix: also preserve alignment flag in block processor</title>
<updated>2021-06-07T12:32:23+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-07T12:32:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a49a5bc6253883f8dab06d5bae7e5453008da164'/>
<id>urn:sha1:a49a5bc6253883f8dab06d5bae7e5453008da164</id>
<content type='text'>
Currently, when the block processor aggreagtes fragments into a
fragment block, it applies the "don't compress" flag if any of the
original framgnets has it set, but the "align to device block" flag
is lost.

This commit ensures that both flags get applied to the fragment block
if set.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libsquashfs: fix block alignment if requested</title>
<updated>2021-06-07T12:30:29+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-07T09:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=85d88bcdc74d6a092a2932ff6b80ac455556f0ce'/>
<id>urn:sha1:85d88bcdc74d6a092a2932ff6b80ac455556f0ce</id>
<content type='text'>
1) If the block alignment flag is set, the padding bytes must be
   inserted _before_ recording the start position, otherwise the
   resulting image is not readable.

2) Also perform alignment if the flag is set on a fragment block.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
