You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (r->header.cupsBitsPerColor!=1&&r->header.cupsBitsPerColor!=2&&r->header.cupsBitsPerColor!=4&&r->header.cupsBitsPerColor!=8&&r->header.cupsBitsPerColor!=16)
1831
+
{
1832
+
_cupsRasterAddError("Invalid bits per color %u.", r->header.cupsBitsPerColor);
1833
+
ret=0;
1834
+
}
1835
+
1836
+
if ((r->header.cupsColorOrder!=CUPS_ORDER_CHUNKED&&r->header.cupsBitsPerPixel!=r->header.cupsBitsPerColor) || (r->header.cupsColorOrder==CUPS_ORDER_CHUNKED&&r->header.cupsBitsPerPixel!= (r->header.cupsBitsPerColor*r->header.cupsNumColors)))
1837
+
{
1838
+
_cupsRasterAddError("Invalid bits per pixel %u.", r->header.cupsBitsPerPixel);
1839
+
ret=0;
1840
+
}
1841
+
1828
1842
if (r->header.cupsBytesPerLine==0)
1829
1843
{
1830
1844
_cupsRasterAddError("Invalid raster line length 0.");
_cupsRasterAddError("Invalid bits per color %u.", r->header.cupsBitsPerColor);
1847
-
ret=0;
1848
-
}
1849
-
1850
-
if (r->header.cupsBitsPerPixel==0||r->header.cupsBitsPerPixel>_CUPS_MAX_BITS_PER_PIXEL)
1851
-
{
1852
-
_cupsRasterAddError("Invalid bits per pixel %u.", r->header.cupsBitsPerPixel);
1859
+
_cupsRasterAddError("Raster line length %u does not match width (%u) and bits per pixel (%u).", r->header.cupsBytesPerLine, r->header.cupsWidth, r->header.cupsBitsPerPixel);
1853
1860
ret=0;
1854
1861
}
1855
1862
1856
-
if (r->header.cupsWidth==0)
1863
+
if (r->header.cupsWidth==0||r->header.cupsWidth>_CUPS_MAX_WIDTH)
0 commit comments