From 8326c129217aa30a7ca20219dd9e107b1a0c5623 Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 25 Mar 2015 20:04:18 +0000 Subject: [PATCH] Fix another potential buffer overflow (STR #4600) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12572 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-2.0.txt | 2 +- filter/rastertoepson.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index 73a7b9406..56b28b5f5 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -6,7 +6,7 @@ CHANGES IN CUPS V2.0.3 - Restored missing generic printer icon file (STR #4587) - Fixed logging of configuration errors to show up as errors (STR #4582) - Fixed potential buffer overflows in raster code and filters - (STR #4598, STR #4599) + (STR #4598, STR #4599, STR #4600) - Added Russian translation (STR #4577) diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c index 87243a966..7edd2097f 100644 --- a/filter/rastertoepson.c +++ b/filter/rastertoepson.c @@ -274,7 +274,7 @@ StartPage( if (header->cupsCompression || DotBytes) { - if ((CompBuffer = calloc(2, header->cupsWidth)) == NULL) + if ((CompBuffer = calloc(2, header->cupsWidth + 1)) == NULL) { fputs("ERROR: Unable to allocate memory\n", stderr); exit(1); -- 2.39.2