Blame SOURCES/amanda-3.5.2-CVE-2022-37705.patch

ff65fb
From ed37ddf8421e34a255eaedfc1e9c3a3f9d454b95 Mon Sep 17 00:00:00 2001
ff65fb
From: Prajwal T R <prajwaltr93@gmail.com>
ff65fb
Date: Thu, 22 Dec 2022 10:37:30 -0700
ff65fb
Subject: [PATCH] fix : fix increment logic for good_option
ff65fb
ff65fb
- for arguements of type --file=x or --file x, fixed logic while incrementing value.
ff65fb
---
ff65fb
 client-src/runtar.c | 4 ++--
ff65fb
 1 file changed, 2 insertions(+), 2 deletions(-)
ff65fb
ff65fb
diff --git a/client-src/runtar.c b/client-src/runtar.c
ff65fb
index d04a1385f6..499c7dfecb 100644
ff65fb
--- a/client-src/runtar.c
ff65fb
+++ b/client-src/runtar.c
ff65fb
@@ -191,9 +191,9 @@ main(
ff65fb
 		g_str_has_prefix(argv[i],"--newer") ||
ff65fb
 		g_str_has_prefix(argv[i],"--exclude-from") ||
ff65fb
 		g_str_has_prefix(argv[i],"--files-from")) {
ff65fb
-		/* Accept theses options with the following argument */
ff65fb
-		good_option += 2;
ff65fb
+		good_option++;
ff65fb
 	    } else if (argv[i][0] != '-') {
ff65fb
+		/* argument values are accounted for here */
ff65fb
 		good_option++;
ff65fb
 	    }
ff65fb
 	}