diff --git a/print/a2ps/files/patch-options.c b/print/a2ps/files/patch-options.c index a5ec2217d8ad..e4f214a09350 100644 --- a/print/a2ps/files/patch-options.c +++ b/print/a2ps/files/patch-options.c @@ -1,18 +1,18 @@ --- lib/options.c.orig 1999-08-31 17:42:41 UTC +++ lib/options.c -@@ -493,6 +493,15 @@ a2ps_handle_options (a2ps_job * job, int +@@ -493,6 +493,15 @@ a2ps_handle_options (a2ps_job * job, int argc, char *a /* A font size is given */ job->fontsize = get_length ("--font-size", cp, 0.0, 0.0, "pt", range_min_strict); + if (job->fontsize == 0.0) + { + error (0, 0, _("invalid argument %s for -f or --font-size option"), + cp); + fprintf (stderr, + _("Valid arguments are floats with optonal units!\n")); + fprintf (stderr, _("Try `a2ps --help' for more information.\n")); + exit (EXIT_FAILURE); + } job->columns_requested = 0; job->lines_requested = 0; } diff --git a/print/a2ps/files/patch-output.c b/print/a2ps/files/patch-output.c index 325dc1887b78..a4b487661f87 100644 --- a/print/a2ps/files/patch-output.c +++ b/print/a2ps/files/patch-output.c @@ -1,13 +1,11 @@ -Fix for CVE-2015-8107 -http://www.openwall.com/lists/oss-security/2015/11/16/4 --- lib/output.c.orig 1999-08-31 17:42:41 UTC -+++ lib/output.c 2015-11-18 07:08:31.672864000 +0100 -@@ -525,7 +525,7 @@ ++++ lib/output.c +@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job, expand_user_string (job, FIRST_FILE (job), (const uchar *) "Expand: requirement", (const uchar *) token)); - output (dest, expansion); + output (dest, "%s", expansion); continue; } diff --git a/print/a2ps/files/patch-path-concat.c b/print/a2ps/files/patch-path-concat.c new file mode 100644 index 000000000000..8f8edd4120d8 --- /dev/null +++ b/print/a2ps/files/patch-path-concat.c @@ -0,0 +1,11 @@ +--- lib/path-concat.c.orig 1999-10-10 18:34:46 UTC ++++ lib/path-concat.c +@@ -31,7 +31,7 @@ + #endif + #include + +-char *malloc (); ++#include + + #ifndef DIRECTORY_SEPARATOR + # define DIRECTORY_SEPARATOR '/' diff --git a/print/a2ps/files/patch-printers.c b/print/a2ps/files/patch-printers.c index 52ff8ac9b185..e19d419fa0e0 100644 --- a/print/a2ps/files/patch-printers.c +++ b/print/a2ps/files/patch-printers.c @@ -1,13 +1,13 @@ --- lib/printers.c.orig 1999-10-11 22:01:59 UTC +++ lib/printers.c -@@ -315,8 +315,8 @@ a2ps_printers_new (struct a2ps_common_s +@@ -315,8 +315,8 @@ a2ps_printers_new (struct a2ps_common_s * common) res->ppd = NULL; /* Printer's ppd are not read yet */ /* Output */ - /* Default is to send to default printer */ - res->flag_output_is_printer = true; + /* Default is to send to stdout */ + res->flag_output_is_printer = false; res->flag_output_name = NULL; res->output_is_file = true; res->output_name = NULL; diff --git a/print/a2ps/files/patch-printlen.c b/print/a2ps/files/patch-printlen.c index 4afb7da9f1d5..d56cc8e24b29 100644 --- a/print/a2ps/files/patch-printlen.c +++ b/print/a2ps/files/patch-printlen.c @@ -1,27 +1,28 @@ --- lib/printlen.c.orig 1999-08-31 17:42:42 UTC +++ lib/printlen.c -@@ -28,14 +28,11 @@ Foundation, Inc., 59 Temple Place - Suit +@@ -28,15 +28,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, unsigned long strtoul (); static int -int_printflen (const char *format, va_list *args) +int_printflen (const char *format, va_list ap) { const char *cp; int total_width = 0; int width = 0; - va_list ap; -- -- memcpy (&ap, args, sizeof (va_list)); +- memcpy (&ap, args, sizeof (va_list)); +- for (cp = format ; *cp ; cp++) { -@@ -99,7 +96,7 @@ int_printflen (const char *format, va_li + if (*cp != '%') +@@ -99,7 +96,7 @@ int_printflen (const char *format, va_list *args) int vprintflen (const char *format, va_list args) { - return int_printflen (format, &args); + return int_printflen (format, args); } int diff --git a/print/a2ps/files/patch-title.c b/print/a2ps/files/patch-title.c index 7f0a807aa26f..a444fc7ead76 100644 --- a/print/a2ps/files/patch-title.c +++ b/print/a2ps/files/patch-title.c @@ -1,11 +1,11 @@ --- lib/title.c.orig 1999-08-28 16:54:19 UTC +++ lib/title.c -@@ -88,6 +88,8 @@ title (stream, c, center_p, format, va_a +@@ -88,6 +88,8 @@ title (stream, c, center_p, format, va_alist) if (center_p) for (padding = 0 ; padding < 79 - len ; padding += 2) putc (' ', stream); + va_end(args); + VA_START(args, format); # if HAVE_VPRINTF || _LIBC vfprintf (stream, format, args); # else