malloc without NULL check
andreas moroder
andreas.moroder at sb-brixen.it
Sat May 24 13:06:14 PDT 2008
Hello,
in rastertolabel.c the return values of malloc are never checked for NULL value.
in rastertoescpx.c line 1004 no NULL check
band = (cups_weave_t *)calloc(1, sizeof(cups_weave_t));
band->next = DotAvailList;
line 1031
PixelBuffer = malloc(header->cupsBytesPerLine);
InputBuffer = malloc(header->cupsWidth * PrinterPlanes * 2);
OutputBuffers[0] = malloc(PrinterPlanes * header->cupsWidth);
for (i = 1; i < PrinterPlanes; i ++)
OutputBuffers[i] = OutputBuffers[0] + i * header->cupsWidth;
in rastertopclx.c line 771 no NULL check and all the following mallocs
in snmp.c at line 313 no NULL check
temp = calloc(1, sizeof(snmp_cache_t));
memcpy(&(temp->address), addr, sizeof(temp->address));
and more in other places in cups-1.4svn-r7613
Bye
Andreas
More information about the cups-devel
mailing list