<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib, branch fixes-1.0.0</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=fixes-1.0.0</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=fixes-1.0.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2022-08-19T16:59:52+00:00</updated>
<entry>
<title>Fix: libfstree: double free in error path</title>
<updated>2022-08-19T16:59:52+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-08-19T16:54:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=ee92da3498723edb0049ed76479392da179ec5b9'/>
<id>urn:sha1:ee92da3498723edb0049ed76479392da179ec5b9</id>
<content type='text'>
If fstree_mknode fails, because the parent link count would overflow,
the function fails and cleans up behind it. The problem arises because
the function does this check *after* inserting the node in the parent
node, so it is later free'd again, when destroying the rest of the
tree.

This patch moves the insertion after the check to mitigate the problem.

Reported-by: Marvin Renich &lt;mrvn@renich.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: libfstree: actually use a full 32 bit hard link counter</title>
<updated>2022-08-19T16:45:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-07-08T15:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a9536fe9d0d2a01bf2b168e742736b014723c99b'/>
<id>urn:sha1:a9536fe9d0d2a01bf2b168e742736b014723c99b</id>
<content type='text'>
The squashfs on-disk format uses 32 bit link counters, but the fstree
used 16 bit ones. Because the link count also includes child nodes,
this artificially limited the number of entries in a directory to ~64k
files.

This patch removes the limit by switching libfstree to 32 bit counters.

Reported-by: Marvin Renich &lt;mrvn@renich.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Update built-in zlib version</title>
<updated>2022-03-30T21:08:38+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-03-30T14:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a9989093d0a8832df326f543940560431e884338'/>
<id>urn:sha1:a9989093d0a8832df326f543940560431e884338</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: guard against potential overflow in file size calculation</title>
<updated>2022-03-30T21:08:08+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-03-10T22:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3afa0946239b31bf0487bb972e701cc85942445d'/>
<id>urn:sha1:3afa0946239b31bf0487bb972e701cc85942445d</id>
<content type='text'>
The block_count is a size_t, so on 32 bit platforms the multiplication
might be truncated before the comparison with filesz.

On 64 bit platforms, it could potentially also overflow the 64 bit
bounds of the data type.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix warning if __SIZEOF_INT128__ is not defined</title>
<updated>2022-03-30T21:07:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-03-10T22:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8963b95e1aacddd3329ff3ed5d1c4957685df4b3'/>
<id>urn:sha1:8963b95e1aacddd3329ff3ed5d1c4957685df4b3</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup libtar mkxattr, explicitly null-terminate strings</title>
<updated>2022-03-30T21:07:52+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-03-10T21:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3887a949a71f3bf2d7c17a4b4c9538d3bb7f6d86'/>
<id>urn:sha1:3887a949a71f3bf2d7c17a4b4c9538d3bb7f6d86</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: consistently use the widechar file API on Windows</title>
<updated>2022-03-30T21:04:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-11-27T23:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=e5a6ce28bf1a025b332c63a002f4199f015d77ae'/>
<id>urn:sha1:e5a6ce28bf1a025b332c63a002f4199f015d77ae</id>
<content type='text'>
When opening files on windows, use the widechar versions and convert
from (assumed) UTF-8 to UTF-16 as needed.

Since the broken, code-page-random API may acutall be intended in some
use cases, leave that option in through an additional flag.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: libcommon: Correctly restore prefix path in mkdir_p on Windows</title>
<updated>2021-11-25T21:18:02+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-11-24T11:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=814a50bff99e3dabb86c7f31fb3e110ed5b5debd'/>
<id>urn:sha1:814a50bff99e3dabb86c7f31fb3e110ed5b5debd</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Tighten bounds checks in sqfs_dir_reader_reader</title>
<updated>2021-08-22T11:44:51+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-08-22T11:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=0d2125014c22caf55b0e5f3cfe11aa516cd6c2e3'/>
<id>urn:sha1:0d2125014c22caf55b0e5f3cfe11aa516cd6c2e3</id>
<content type='text'>
Use the same size check as sqfs_dir_reader_open_dir and report EOF,
even if it is possible to read the header itself, but nothing beyond
that.

Also check if it should be possible to read an entry header before
attempting and report EOF if not.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix half done initialization of sqfs_dir_reader_open_dir</title>
<updated>2021-08-22T11:44:46+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-08-22T11:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=dc694ae0191ed50b7d5aea508e0f5207ba2b452a'/>
<id>urn:sha1:dc694ae0191ed50b7d5aea508e0f5207ba2b452a</id>
<content type='text'>
The sqfs_dir_reader_open_dir function tried to take a short-cut by
returning early if the target directory is empty. However, this left
some field unchanged from the previous directory.

If iterating over a directory and then deciding to enter a sub-directory
that happens to be empty, the directory reader will keep the settings
for the current directory. After calling sqfs_dir_reader_rewind, the
sub-directory will suddenly report the contents of the parent.

A similar check is added to the rewind function to not track back on
the meta data reader in that case.

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