summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-06-18 16:39:30 -0400
committerDidier Raboud <odyx@debian.org>2018-07-03 07:16:49 +0200
commite00746f433f043017a63a3f4378a719d778814e5 (patch)
treec6a23b72dc78c4236534b38b6a72ba3744fef086
parentd8ce1e7f130c773f37fd63f33cf85a8847d90177 (diff)
Fix A4 crash in Epson 24-pin driver
Upstream-Bug: #5323 Debian-Bug: #901860
-rw-r--r--filter/rastertoepson.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c
index 4efe6692b..3de491f92 100644
--- a/filter/rastertoepson.c
+++ b/filter/rastertoepson.c
@@ -1,7 +1,7 @@
/*
* EPSON ESC/P and ESC/P2 filter for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2018 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -307,7 +307,7 @@ StartPage(
if (DotBytes)
{
- if ((LineBuffers[0] = calloc((size_t)DotBytes, header->cupsWidth * (size_t)(Shingling + 1))) == NULL)
+ if ((LineBuffers[0] = calloc((size_t)DotBytes, (header->cupsWidth + 7) * (size_t)(Shingling + 1))) == NULL)
{
fputs("ERROR: Unable to allocate memory\n", stderr);
exit(1);