Dirk Mueller
2cfa239220
- update to 4.6.1: * Race condition which can cause corruption of the "fragment table" fixed. This is a regression introduced in August 2022, and it has been seen when tailend packing is used (-tailends option). * Fix build failure when the tools are being built without extended attribute (XATTRs) support. * Fix XATTR error message when an unrecognised prefix is found * Fix incorrect free of pointer when an unrecognised XATTR prefix is found. * Major improvements in extended attribute handling, pseudo file handling, and miscellaneous new options and improvements * Extended attribute handling improved in Mksquashfs and Sqfstar * New Pseudo file xattr definition to add extended attributes to files. * New xattrs-add Action to add extended attributes to files * Extended attribute handling improved in Unsquashfs * Other major improvements * Unsquashfs can now output Pseudo files to standard out. * Mksquashfs can now input Pseudo files from standard in. * Squashfs filesystems can now be converted (different block size compression etc) without unpacking to an intermediate filesystem or mounting, by piping the output of Unsquashfs to Mksquashfs. * Pseudo files are now supported by Sqfstar. * "Non-anchored" excludes are now supported by Unsquashfs. OBS-URL: https://build.opensuse.org/request/show/1079568 OBS-URL: https://build.opensuse.org/package/show/filesystems/squashfs?expand=0&rev=56
21 lines
855 B
Plaintext
21 lines
855 B
Plaintext
Index: squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c
|
|
===================================================================
|
|
--- squashfs-tools-4.6.1.orig/squashfs-tools/mksquashfs.c
|
|
+++ squashfs-tools-4.6.1/squashfs-tools/mksquashfs.c
|
|
@@ -5276,6 +5276,15 @@ static void initialise_threads(int readq
|
|
}
|
|
#endif
|
|
}
|
|
+ /* Every frag_thrd will:
|
|
+ * * occupy a slot in the process table (_SC_CHILD_MAX), and will
|
|
+ * * allocate SQUASHFS_FILE_MAX_SIZE (currently 1MiB), which is
|
|
+ * accounted towards the per-process datasize limit, and will
|
|
+ * * open 1 file descriptor (_SC_OPEN_MAX).
|
|
+ * Before we hit any of those limits on big irons, limit
|
|
+ * ourselves to an impressive but sane arbitrary maximum.
|
|
+ */
|
|
+ if (processors > 64) processors = 64;
|
|
|
|
if(multiply_overflow(processors, 3) ||
|
|
multiply_overflow(processors * 3, sizeof(pthread_t)))
|