/*
- * "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $"
+ * "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $"
*
* Hewlett-Packard Page Control Language filter for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* Allocate memory for a line of graphics...
*/
- if ((Planes[0] = malloc(header->cupsBytesPerLine)) == NULL)
+ if ((Planes[0] = malloc(header->cupsBytesPerLine + NumPlanes)) == NULL)
{
fputs("ERROR: Unable to allocate memory\n", stderr);
exit(1);
BitBuffer = NULL;
if (header->cupsCompression)
- CompBuffer = malloc(header->cupsBytesPerLine * 2);
+ CompBuffer = malloc(header->cupsBytesPerLine * 2 + 2);
else
CompBuffer = NULL;
}
/*
- * End of "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $".
+ * End of "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $".
*/