<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/include/sqfs, branch fixes-1.2.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.2.0</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=fixes-1.2.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2022-07-08T17:17:35+00:00</updated>
<entry>
<title>Make sqfs_tree_node_get_path more robust</title>
<updated>2022-07-08T17:17:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-07-05T10:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=75063b2e14dacc13fcbeeba24e580198a7c1c638'/>
<id>urn:sha1:75063b2e14dacc13fcbeeba24e580198a7c1c638</id>
<content type='text'>
Test against various invariants:
 - Every non-root node must have a name
 - The root node muts not have a name
 - The name must not be ".." or "."
 - The name must not contain '/'
 - The loop that chases parent pointers must terminate, i.e. we must
   never reach the starting state again (link loop).

Furthermore, make sure the sum of all path components plus separators
does not overflow.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Move sqfs_tree_node_get_path to libsquashfs</title>
<updated>2022-07-08T17:17:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-07-04T18:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3946cf086183f8dd4d5d115f52ba1b87560b7ce4'/>
<id>urn:sha1:3946cf086183f8dd4d5d115f52ba1b87560b7ce4</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: libsqfs: move directory iteration out of the directory reader</title>
<updated>2022-06-02T15:26:53+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-05-31T22:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a36cf2824c74a3ba7333801268d0ba4194684423'/>
<id>urn:sha1:a36cf2824c74a3ba7333801268d0ba4194684423</id>
<content type='text'>
Add a simple directory state object to the meta data reader and use
that to iterate directory entries. The code for reading the directory
listing is movde to readdir.c

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add support for '.' and '..' entries in sqfs_dir_reader_t</title>
<updated>2022-04-09T21:26:13+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-04-09T21:20:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=020698f3a92195eb371e806a0b3ed0649565046f'/>
<id>urn:sha1:020698f3a92195eb371e806a0b3ed0649565046f</id>
<content type='text'>
Two flags are added to the dir reader API, one for the create function
that the dir reader should report those entries and one to the open
function to suppress that if it was enabled.

To implement the feature, a mapping of visited directory inodes is
maintained internally, that mapps inode numbers to inode references.

When opening a directory, state is maintained to generate the fake
entries for '.' and '..'. Since all the other functions are based on
the open/read/rewind API, no alterations need to be made. The tree
scan function is modified, to use the suppress flag, so it does not
accidentally catch those entries.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>sqfs_dir_tree_destroy/sqfs_destroy: allow NULL input</title>
<updated>2022-03-30T20:31:30+00:00</updated>
<author>
<name>Luca Boccassi</name>
<email>luca.boccassi@microsoft.com</email>
</author>
<published>2021-07-30T14:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a0c0f38cb947a16a5aebf2b59fb8481866d28f96'/>
<id>urn:sha1:a0c0f38cb947a16a5aebf2b59fb8481866d28f96</id>
<content type='text'>
Many library destructor functions (like free()) allow a NULL
pointer as input, and do nothing in that case.
This allows easier cleanup patterns: initialize pointers to NULL
and then always pass them to the destroyer functions, no need for
verbose goto/if-else patterns.

Signed-off-by: Luca Boccassi &lt;luca.boccassi@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Fix: consistently use the widechar file API on Windows</title>
<updated>2021-12-05T09:29:36+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=2b8eb19a4de81db470f7ff5021a8a4822cc8c80d'/>
<id>urn:sha1:2b8eb19a4de81db470f7ff5021a8a4822cc8c80d</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 libsquashfs directory writer size accounting</title>
<updated>2021-07-21T07:56:31+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=248494992442fbde7eb6ca3979a778d82fa86016'/>
<id>urn:sha1:248494992442fbde7eb6ca3979a778d82fa86016</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>Remove casual un-const casting in various places</title>
<updated>2021-06-25T13:12:41+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=8348086b48af0cbabe4cf2b64992ced6561ea50c'/>
<id>urn:sha1:8348086b48af0cbabe4cf2b64992ced6561ea50c</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix: libsquashfs: allow static linking on Windows</title>
<updated>2021-04-09T09:55:04+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-04-08T10:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=f92d3354df3c0bb930b103a58d905a77a7281a26'/>
<id>urn:sha1:f92d3354df3c0bb930b103a58d905a77a7281a26</id>
<content type='text'>
If SQFS_STATIC is defined, dummy out the SQFS_API definition, so we
don't try to pull stuff from a (in this case) non-existant DLL or
try to export functions.

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-04-08T10:04:33+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=a3739ada111bf4e36ae7576b24176d1db55e1365'/>
<id>urn:sha1:a3739ada111bf4e36ae7576b24176d1db55e1365</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>
</feed>
