18450560 /usr/bin/grops dumps core with invalid argument value
authorRich Burridge <rich.burridge@oracle.com>
Thu, 08 May 2014 09:41:49 -0700
changeset 1885 2572673471ef
parent 1884 d1a47da60382
child 1886 09b39660eb0b
18450560 /usr/bin/grops dumps core with invalid argument value
components/groff/patches/grops-ps.cpp.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/groff/patches/grops-ps.cpp.patch	Thu May 08 09:41:49 2014 -0700
@@ -0,0 +1,19 @@
+Prevent /usr/bin/grops from dumping core with given an invalid argument value
+with something such as
+
+ $ /usr/bin/grops -c a
+
+Fix has been submitted upstream:
+http://savannah.gnu.org/bugs/?42190
+
+--- groff-1.22.2/src/devices/grops/ps.cpp.orig	2014-04-24 06:01:32.421674773 -0700
++++ groff-1.22.2/src/devices/grops/ps.cpp	2014-04-24 09:27:56.445423217 -0700
[email protected]@ -1803,7 +1803,7 @@
+       break;
+     case 'c':
+       if (sscanf(optarg, "%d", &ncopies) != 1 || ncopies <= 0) {
+-	error("bad number of copies `%s'", optarg);
++	error("bad number of copies `%1'", optarg);
+ 	ncopies = 1;
+       }
+       break;