aboutsummaryrefslogtreecommitdiff
path: root/src/unalf.rst
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-12-03 03:00:10 -0500
committerB. Watson <urchlay@slackware.uk>2025-12-03 03:00:10 -0500
commitfff0d9587f674e2b1f61ba693ef830862dc1241d (patch)
tree20a9d4d1e9fb145f2c2d937a478aa220f16da728 /src/unalf.rst
parent939dab58d23272a68c16c625dbd14ff3f8f6c51b (diff)
downloadalftools-fff0d9587f674e2b1f61ba693ef830862dc1241d.tar.gz
unalf: Abort on ludicrously large sizes in the header. Add -F to bypass, warn the user this may cause an infinite loop.
Diffstat (limited to 'src/unalf.rst')
-rw-r--r--src/unalf.rst29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/unalf.rst b/src/unalf.rst
index 146e056..069fad1 100644
--- a/src/unalf.rst
+++ b/src/unalf.rst
@@ -89,6 +89,13 @@ OPTIONS
.. fix (remove) junk at EOF.
+-F
+ Force **unalf** to continue after detecting an invalid compressed file
+ size in an *ALF* header. This isn't the default because it can cause
+ **unalf** to get stuck in an infinite loop.
+
+.. force uncompressing in case of invalid compressed size.
+
-h, --help
Show built-in help message.
@@ -242,6 +249,20 @@ Fatal errors
**fatal: compressed data is truncated, EOF before end marker**
Self-explanatory. The ALF file ends before the compressed data does.
+**header #<n> (compressed|original) size is impossibly large (>16MB)**
+ **unalf** can't handle files of more than 16MB in size. This isn't a
+ bug, it's just the way it was designed (in 1988, remember). Neither
+ **LZ.COM** nor **alf** will create files like this, so you *probably*
+ have a corrupt ALF archive.
+
+**compressed size for header #<n> is bigger than the rest of the file (truncated?)**
+ Normally this means a truncated *ALF* file, or one with a corrupted header.
+ You can use the **-F** option to turn this error into a non-fatal warning.
+
+**compressed size for header #<n> is over twice the uncompressed size (corrupt?)**
+ This generally means you have a corrupted *ALF* file.
+ You can use the **-F** option to turn this error into a non-fatal warning.
+
Warnings
--------
@@ -287,11 +308,9 @@ Warnings
any unprintable characters as hex values (e.g. **$01**).
**header #<n> (compressed|original) size is...**
- Followed by "impossibly large", "suspiciously large", or "too large
- to fit on a floppy disk". May indicate a corrupt archive, or someone
- really might have created an ALF file with files this big... though
- "impossibly large" means >=16MB. **unalf** can't extract a file
- that big.
+ Followed by "suspiciously large" or "too large to fit on a floppy
+ disk". May indicate a corrupt archive, or someone really might have
+ created an ALF file with files this big.
**ALF files don't normally contain other ALF files, are you trying to extract/list multiple ALF files at once?**
You gave a *wildcard* argument that ends with *.alf*. This is OK if