Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
cups-filters
cups-filters-1.0.58-CVE-2015-3258-CVE-2015-3279...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cups-filters-1.0.58-CVE-2015-3258-CVE-2015-3279.patch of Package cups-filters
--- cups-filters-1.0.58/filter/textcommon.c 2014-04-07 16:40:24.000000000 +0200 +++ cups-filters-1.0.71/filter/textcommon.c 2015-07-03 00:51:21.000000000 +0200 @@ -26,6 +26,7 @@ */ #include "textcommon.h" +#include <limits.h> /* @@ -644,6 +645,45 @@ TextMain(const char *name, /* I - Name o if (PrettyPrint) PageTop -= 216.0f / LinesPerInch; + /* + * Allocate memory for the page... + */ + + SizeColumns = (PageRight - PageLeft) / 72.0 * CharsPerInch; + SizeLines = (PageTop - PageBottom) / 72.0 * LinesPerInch; + + /* + * Enforce minimum size... + */ + if (SizeColumns < 1) + SizeColumns = 1; + if (SizeLines < 1) + SizeLines = 1; + + if (SizeLines >= INT_MAX / SizeColumns / sizeof(lchar_t)) + { + fprintf(stderr, "ERROR: bad page size\n"); + exit(1); + } + + Page = calloc(sizeof(lchar_t *), SizeLines); + if (!Page) + { + fprintf(stderr, "ERROR: cannot allocate memory for page\n"); + exit(1); + } + + Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines); + if (!Page[0]) + { + free(Page); + fprintf(stderr, "ERROR: cannot allocate memory for page\n"); + exit(1); + } + + for (i = 1; i < SizeLines; i ++) + Page[i] = Page[0] + i * SizeColumns; + Copies = atoi(argv[4]); WriteProlog(argv[3], argv[2], getenv("CLASSIFICATION"), @@ -1122,6 +1162,8 @@ TextMain(const char *name, /* I - Name o if (ppd != NULL) ppdClose(ppd); + free(Page[0]); + free(Page); return (0); } --- cups-filters-1.0.58/filter/texttopdf.c 2013-12-10 22:20:15.000000000 +0100 +++ cups-filters-1.0.71/filter/texttopdf.c 2015-07-03 00:51:21.000000000 +0200 @@ -172,9 +172,6 @@ WriteEpilogue(void) { "FN","FB","FI" }; int i,j; - free(Page[0]); - free(Page); - // embed fonts for (i = PrettyPrint ? 2 : 1; i >= 0; i --) { for (j = 0; j < NumFonts; j ++) @@ -333,18 +330,6 @@ WriteProlog(const char *title, /* I - T PageTop -= 36; } - /* - * Allocate memory for the page... - */ - - SizeColumns = (PageRight - PageLeft) / 72.0 * CharsPerInch; - SizeLines = (PageTop - PageBottom) / 72.0 * LinesPerInch; - - Page = calloc(sizeof(lchar_t *), SizeLines); - Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines); - for (i = 1; i < SizeLines; i ++) - Page[i] = Page[0] + i * SizeColumns; - if (PageColumns > 1) { ColumnGutter = CharsPerInch / 2;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor