aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-12-03 17:41:23 -0500
committerB. Watson <urchlay@slackware.uk>2025-12-03 17:41:23 -0500
commit9569e9c6b4557020167327dc3bafb32801509516 (patch)
tree140a6fb6b3df60db3ef1c2819154cbb33297cb6b
parent2658f7e516e3257fff0973b0bd952c5c707773cd (diff)
downloadalftools-9569e9c6b4557020167327dc3bafb32801509516.tar.gz
unalf: truncation is fatal again (avoids segfaults).
-rw-r--r--src/asmcode.c2
-rw-r--r--src/extract.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/asmcode.c b/src/asmcode.c
index 1e31c6c..8b1fab3 100644
--- a/src/asmcode.c
+++ b/src/asmcode.c
@@ -210,7 +210,7 @@ L770F:
jmp(L779B);
/* ---------------------------------------------------------------------------- */
L7712:
- truncated_err(); /* does not exit */
+ truncated_err(); /* exits */
/* ---------------------------------------------------------------------------- */
L771C:
tay();
diff --git a/src/extract.c b/src/extract.c
index ff8d780..98523db 100644
--- a/src/extract.c
+++ b/src/extract.c
@@ -161,7 +161,8 @@ void chksum_err(void) {
}
void truncated_err(void){
- fprintf(stderr, "%s: warning: compressed data is truncated, EOF before end marker\n", self);
+ fprintf(stderr, "%s: fatal: compressed data is truncated, EOF before end marker\n", self);
+ exit(1);
}
void stack_underrun(void){