summaryrefslogtreecommitdiff
path: root/Build/source/texk/ps2pk
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-12-05 13:00:50 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-12-05 13:00:50 +0000
commit5114db9cc2aee9fecc7dde20cfb5b800507c0ac0 (patch)
tree8df99c5de6e63927b09b7f05ff4cc14f40a09103 /Build/source/texk/ps2pk
parent521354b6155bd18e42038fd9f069532a0e0e5d65 (diff)
check for missing args, more
git-svn-id: svn://tug.org/texlive/trunk@49324 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pk')
-rw-r--r--Build/source/texk/ps2pk/ChangeLog4
-rw-r--r--Build/source/texk/ps2pk/mag.c2
-rw-r--r--Build/source/texk/ps2pk/pk2bm.c5
3 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/texk/ps2pk/ChangeLog b/Build/source/texk/ps2pk/ChangeLog
index c01adf53cd3..09eebc9b8bf 100644
--- a/Build/source/texk/ps2pk/ChangeLog
+++ b/Build/source/texk/ps2pk/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-05 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * mag.c, pk2bm.c: check for missing arguments.
+
2018-12-01 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* ps2pk.c: check for missing arguments.
diff --git a/Build/source/texk/ps2pk/mag.c b/Build/source/texk/ps2pk/mag.c
index 96857286987..3f5c6b61d57 100644
--- a/Build/source/texk/ps2pk/mag.c
+++ b/Build/source/texk/ps2pk/mag.c
@@ -104,9 +104,11 @@ int main(int argc, char *argv[]) {
if (*++argv[0] == '\0') {
argc--; argv++;
}
+ if (argv[0] == '\0') goto invalid;
DPI = atof(argv[0]);
done = 1;
break;
+invalid:
default:
fatal("%s: %c invalid option\n", myname, c);
}
diff --git a/Build/source/texk/ps2pk/pk2bm.c b/Build/source/texk/ps2pk/pk2bm.c
index 39303dadf82..5445bf74092 100644
--- a/Build/source/texk/ps2pk/pk2bm.c
+++ b/Build/source/texk/ps2pk/pk2bm.c
@@ -64,18 +64,21 @@ int main(int argc, char *argv[])
if (*++argv[0] == '\0') {
argc--; argv++;
}
+ if (argv[0] == '\0') goto invalid;
C = *argv[0];
done = 1; break;
case 'o':
if (*++argv[0] == '\0') {
argc--; ++argv;
}
+ if (argv[0] == '\0') goto invalid;
C = atoo(argv[0]);
done = 1; break;
case 'H':
if (*++argv[0] == '\0') {
argc--; argv++;
}
+ if (argv[0] == '\0') goto invalid;
h = atoi(argv[0]);
done=1;
break;
@@ -83,6 +86,7 @@ int main(int argc, char *argv[])
if (*++argv[0] == '\0') {
argc--; argv++;
}
+ if (argv[0] == '\0') goto invalid;
w = atoi(argv[0]);
done=1;
break;
@@ -92,6 +96,7 @@ int main(int argc, char *argv[])
case 'h':
hexmap = 1;
break;
+invalid:
default:
printf("%s: %c invalid option\n", myname, c);
exit(1);