From fff0d9587f674e2b1f61ba693ef830862dc1241d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 3 Dec 2025 03:00:10 -0500 Subject: unalf: Abort on ludicrously large sizes in the header. Add -F to bypass, warn the user this may cause an infinite loop. --- src/opts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/opts.c') diff --git a/src/opts.c b/src/opts.c index aca6e83..977a10d 100644 --- a/src/opts.c +++ b/src/opts.c @@ -1,6 +1,6 @@ #include "unalf.h" -#define OPTIONS "aefklLopqtTvVd:x:" +#define OPTIONS "aefFklLopqtTvVd:x:" /* uncomment to test exclude/include glob lists */ // #define DEBUG_GLOBS @@ -38,6 +38,7 @@ void parse_opts(int argc, char * const *argv) { case 'e': opts.listonly = opts.testonly = 0; break; case 'k': opts.keepdot++; break; case 'f': opts.fixjunk++; opts.testonly = 1; opts.listonly = 0; opts.quiet = 1; break; + case 'F': opts.force++; break; case 'l': opts.listonly++; opts.testonly = 0; break; case 'L': opts.lowercase++; break; case 'o': opts.overwrite++; break; -- cgit v1.2.3