Exit correctly when invoked without arguments
This commit is contained in:
parent
4d3de9f89f
commit
4c3e9bbd4f
1
.transfig.metadata
Normal file
1
.transfig.metadata
Normal file
@ -0,0 +1 @@
|
||||
8097c178b7fff1023112250938cc87837c0f564e fig2dev-3.2.7b.tar.xz
|
39
0018-exit-no-args.patch
Normal file
39
0018-exit-no-args.patch
Normal file
@ -0,0 +1,39 @@
|
||||
Subject: [PATCH] Exit correctly when invoked without arguments
|
||||
https://sourceforge.net/p/mcj/fig2dev/ci/11fba42e388ff7d92f81518406429bdea0a6a3b3
|
||||
|
||||
---
|
||||
fig2dev/fig2dev.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/fig2dev/fig2dev.c b/fig2dev/fig2dev.c
|
||||
index 62ec099..949671e 100644
|
||||
--- a/fig2dev/fig2dev.c
|
||||
+++ b/fig2dev/fig2dev.c
|
||||
@@ -161,9 +161,9 @@ static struct depth_opts {
|
||||
|
||||
static char Usage[] =
|
||||
#ifdef I18N
|
||||
-"Usage:\n %s -hV\n %s -L language [-s size] [-m scale] [-j] [input [output]]\n";
|
||||
+"Usage:\n %1$s -hV\n %1$s -L language [-s size] [-m scale] [-j] [input [output]]\n";
|
||||
#else
|
||||
- "Usage:\n %s -hV\n %s -L language [-s size] [-m scale] [input [output]]\n";
|
||||
+ "Usage:\n %1$s -hV\n %1$s -L language [-s size] [-m scale] [input [output]]\n";
|
||||
#endif
|
||||
|
||||
static int parse_gridspec(char *string, float *numer, float *denom,
|
||||
@@ -218,8 +218,10 @@ get_args(int argc, char *argv[])
|
||||
char *grid, *p;
|
||||
float numer, denom;
|
||||
|
||||
- if (argc == 1)
|
||||
- fprintf(stderr, Usage, prog, prog);
|
||||
+ if (argc == 1) {
|
||||
+ fprintf(stderr, Usage, prog);
|
||||
+ exit(EXIT_SUCCESS);
|
||||
+ }
|
||||
|
||||
/* print the version, for the comfort of the autotest tests */
|
||||
if (!strcmp(argv[1], "--version")) {
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: transfig
|
||||
Version: 3.2.7b
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Utility for converting FIG files (made by xfig) to other formats
|
||||
License: MIT
|
||||
@ -24,6 +24,7 @@ Patch14: 0014-CVE-2020-21529.patch
|
||||
Patch15: 0015-CVE-2020-21532.patch
|
||||
Patch16: 0016-CVE-2020-21531.patch
|
||||
Patch17: 0017-CVE-2021-32280.patch
|
||||
Patch18: 0018-exit-no-args.patch
|
||||
|
||||
Requires: ghostscript
|
||||
Requires: bc
|
||||
@ -76,6 +77,9 @@ mv fig2dev.1.in.new man/fig2dev.1.in
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 18 2021 Ondrej Dubaj <odubaj@redhat.com> - 1:3.2.7b-10
|
||||
- Exit correctly when invoked without arguments (#2015001)
|
||||
|
||||
* Thu Sep 23 2021 Ondrej Dubaj <odubaj@redhat.com> - 1:3.2.7b-9
|
||||
- Fixed CVE-2021-32280 (#2006830)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user