project
stringclasses 633
values | commit_id
stringlengths 7
81
| target
int64 0
1
| func
stringlengths 5
484k
| cwe
stringclasses 131
values | big_vul_idx
float64 0
189k
⌀ | idx
int64 0
522k
| hash
stringlengths 34
39
| size
float64 1
24k
⌀ | message
stringlengths 0
11.5k
⌀ | dataset
stringclasses 1
value |
---|---|---|---|---|---|---|---|---|---|---|
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxCalGrayColorSpace::GfxCalGrayColorSpace() {
whiteX = whiteY = whiteZ = 1;
blackX = blackY = blackZ = 0;
gamma = 1;
}
|
CWE-189
| 945 | 11,548 |
308837205071887912664899037381009347898
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxCalRGBColorSpace::GfxCalRGBColorSpace() {
whiteX = whiteY = whiteZ = 1;
blackX = blackY = blackZ = 0;
gammaR = gammaG = gammaB = 1;
mat[0] = 1; mat[1] = 0; mat[2] = 0;
mat[3] = 0; mat[4] = 1; mat[5] = 0;
mat[6] = 0; mat[7] = 0; mat[8] = 1;
}
|
CWE-189
| 946 | 11,549 |
199941523803705516412853323427099267297
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace::GfxColorSpace() {
}
|
CWE-189
| 947 | 11,550 |
203744077018393078599693850755029043907
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxDeviceCMYKColorSpace::GfxDeviceCMYKColorSpace() {
}
|
CWE-189
| 948 | 11,551 |
261126231465690388132712867863399253823
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxDeviceGrayColorSpace::GfxDeviceGrayColorSpace() {
}
|
CWE-189
| 949 | 11,552 |
298749927618869955922749460846544983607
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA,
GfxColorSpace *altA,
Function *funcA) {
nComps = nCompsA;
alt = altA;
func = funcA;
nonMarking = gFalse;
}
|
CWE-189
| 950 | 11,553 |
339442269191681482990160427681126927228
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxDeviceRGBColorSpace::GfxDeviceRGBColorSpace() {
}
|
CWE-189
| 951 | 11,554 |
235270902377422493978294778930611731945
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxFunctionShading::GfxFunctionShading(double x0A, double y0A,
double x1A, double y1A,
double *matrixA,
Function **funcsA, int nFuncsA):
GfxShading(1)
{
int i;
x0 = x0A;
y0 = y0A;
x1 = x1A;
y1 = y1A;
for (i = 0; i < 6; ++i) {
matrix[i] = matrixA[i];
}
nFuncs = nFuncsA;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = funcsA[i];
}
}
|
CWE-189
| 952 | 11,555 |
253127354371487320304767746210724948800
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxFunctionShading::GfxFunctionShading(GfxFunctionShading *shading):
GfxShading(shading)
{
int i;
x0 = shading->x0;
y0 = shading->y0;
x1 = shading->x1;
y1 = shading->y1;
for (i = 0; i < 6; ++i) {
matrix[i] = shading->matrix[i];
}
nFuncs = shading->nFuncs;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = shading->funcs[i]->copy();
}
}
|
CWE-189
| 953 | 11,556 |
41496005268658413098982129686286587324
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxGouraudTriangleShading::GfxGouraudTriangleShading(
int typeA,
GfxGouraudVertex *verticesA, int nVerticesA,
int (*trianglesA)[3], int nTrianglesA,
Function **funcsA, int nFuncsA):
GfxShading(typeA)
{
int i;
vertices = verticesA;
nVertices = nVerticesA;
triangles = trianglesA;
nTriangles = nTrianglesA;
nFuncs = nFuncsA;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = funcsA[i];
}
}
|
CWE-189
| 954 | 11,557 |
111977118532227730424432566785846518905
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxGouraudTriangleShading::GfxGouraudTriangleShading(
GfxGouraudTriangleShading *shading):
GfxShading(shading)
{
int i;
nVertices = shading->nVertices;
vertices = (GfxGouraudVertex *)gmallocn(nVertices, sizeof(GfxGouraudVertex));
memcpy(vertices, shading->vertices, nVertices * sizeof(GfxGouraudVertex));
nTriangles = shading->nTriangles;
triangles = (int (*)[3])gmallocn(nTriangles * 3, sizeof(int));
memcpy(triangles, shading->triangles, nTriangles * 3 * sizeof(int));
nFuncs = shading->nFuncs;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = shading->funcs[i]->copy();
}
}
|
CWE-189
| 955 | 11,558 |
294437573559750741075094681916570536751
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxICCBasedCache::GfxICCBasedCache()
{
num = 0;
gen = 0;
colorSpace = 0;
}
|
CWE-189
| 956 | 11,559 |
14616291125080528338783167910751641601
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxImageColorMap::GfxImageColorMap(GfxImageColorMap *colorMap) {
int n, i, k;
colorSpace = colorMap->colorSpace->copy();
bits = colorMap->bits;
nComps = colorMap->nComps;
nComps2 = colorMap->nComps2;
colorSpace2 = NULL;
for (k = 0; k < gfxColorMaxComps; ++k) {
lookup[k] = NULL;
}
n = 1 << bits;
if (colorSpace->getMode() == csIndexed) {
colorSpace2 = ((GfxIndexedColorSpace *)colorSpace)->getBase();
for (k = 0; k < nComps2; ++k) {
lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
}
} else if (colorSpace->getMode() == csSeparation) {
colorSpace2 = ((GfxSeparationColorSpace *)colorSpace)->getAlt();
for (k = 0; k < nComps2; ++k) {
lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
}
} else {
for (k = 0; k < nComps; ++k) {
lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
}
}
for (i = 0; i < nComps; ++i) {
decodeLow[i] = colorMap->decodeLow[i];
decodeRange[i] = colorMap->decodeRange[i];
}
ok = gTrue;
}
|
CWE-189
| 958 | 11,560 |
320861379727949558421913993236848160198
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxIndexedColorSpace::GfxIndexedColorSpace(GfxColorSpace *baseA,
int indexHighA) {
base = baseA;
indexHigh = indexHighA;
lookup = (Guchar *)gmallocn((indexHigh + 1) * base->getNComps(),
sizeof(Guchar));
}
|
CWE-189
| 959 | 11,561 |
5820340326857509484289888978538762771
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxLabColorSpace::GfxLabColorSpace() {
whiteX = whiteY = whiteZ = 1;
blackX = blackY = blackZ = 0;
aMin = bMin = -100;
aMax = bMax = 100;
}
|
CWE-189
| 960 | 11,562 |
78753356024758357897606370996518838238
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPatchMeshShading::GfxPatchMeshShading(int typeA,
GfxPatch *patchesA, int nPatchesA,
Function **funcsA, int nFuncsA):
GfxShading(typeA)
{
int i;
patches = patchesA;
nPatches = nPatchesA;
nFuncs = nFuncsA;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = funcsA[i];
}
}
|
CWE-189
| 961 | 11,563 |
199290340939886346226169524134631909912
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPatchMeshShading::GfxPatchMeshShading(GfxPatchMeshShading *shading):
GfxShading(shading)
{
int i;
nPatches = shading->nPatches;
patches = (GfxPatch *)gmallocn(nPatches, sizeof(GfxPatch));
memcpy(patches, shading->patches, nPatches * sizeof(GfxPatch));
nFuncs = shading->nFuncs;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = shading->funcs[i]->copy();
}
}
|
CWE-189
| 962 | 11,564 |
67491698680869537753876233692324268382
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPath::GfxPath() {
justMoved = gFalse;
size = 16;
n = 0;
firstX = firstY = 0;
subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *));
}
|
CWE-189
| 963 | 11,565 |
158819494313126486146011935462646009377
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPath::GfxPath(GBool justMoved1, double firstX1, double firstY1,
GfxSubpath **subpaths1, int n1, int size1) {
int i;
justMoved = justMoved1;
firstX = firstX1;
firstY = firstY1;
size = size1;
n = n1;
subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *));
for (i = 0; i < n; ++i)
subpaths[i] = subpaths1[i]->copy();
}
|
CWE-189
| 964 | 11,566 |
120894529431769831524897866555345796031
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPattern::GfxPattern(int typeA) {
type = typeA;
}
|
CWE-189
| 965 | 11,567 |
215413992507600086351738998478053480123
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPatternColorSpace::GfxPatternColorSpace(GfxColorSpace *underA) {
under = underA;
}
|
CWE-189
| 966 | 11,568 |
72983368469672755756391518039553624083
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxRadialShading::GfxRadialShading(double x0A, double y0A, double r0A,
double x1A, double y1A, double r1A,
double t0A, double t1A,
Function **funcsA, int nFuncsA,
GBool extend0A, GBool extend1A):
GfxShading(3)
{
int i;
x0 = x0A;
y0 = y0A;
r0 = r0A;
x1 = x1A;
y1 = y1A;
r1 = r1A;
t0 = t0A;
t1 = t1A;
nFuncs = nFuncsA;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = funcsA[i];
}
extend0 = extend0A;
extend1 = extend1A;
}
|
CWE-189
| 967 | 11,569 |
233012275238301782156759242388639622187
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxRadialShading::GfxRadialShading(GfxRadialShading *shading):
GfxShading(shading)
{
int i;
x0 = shading->x0;
y0 = shading->y0;
r0 = shading->r0;
x1 = shading->x1;
y1 = shading->y1;
r1 = shading->r1;
t0 = shading->t0;
y1 = shading->t1;
nFuncs = shading->nFuncs;
for (i = 0; i < nFuncs; ++i) {
funcs[i] = shading->funcs[i]->copy();
}
extend0 = shading->extend0;
extend1 = shading->extend1;
}
|
CWE-189
| 968 | 11,570 |
204493076260337625460875252151052149034
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxSeparationColorSpace::GfxSeparationColorSpace(GooString *nameA,
GfxColorSpace *altA,
Function *funcA) {
name = nameA;
alt = altA;
func = funcA;
nonMarking = !name->cmp("None");
}
|
CWE-189
| 969 | 11,571 |
122395311947518186692633240275884084569
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading::GfxShading(int typeA) {
type = typeA;
colorSpace = NULL;
}
|
CWE-189
| 970 | 11,572 |
1495843241581411122177576329237083380
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading::GfxShading(GfxShading *shading) {
int i;
type = shading->type;
colorSpace = shading->colorSpace->copy();
for (i = 0; i < gfxColorMaxComps; ++i) {
background.c[i] = shading->background.c[i];
}
hasBackground = shading->hasBackground;
xMin = shading->xMin;
yMin = shading->yMin;
xMax = shading->xMax;
yMax = shading->yMax;
hasBBox = shading->hasBBox;
}
|
CWE-189
| 971 | 11,573 |
89717634482103537113725144212375330138
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShadingBitBuf::GfxShadingBitBuf(Stream *strA) {
str = strA;
str->reset();
bitBuf = 0;
nBits = 0;
}
|
CWE-189
| 972 | 11,574 |
301207557646117109603089367110862798091
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShadingPattern::GfxShadingPattern(GfxShading *shadingA, double *matrixA):
GfxPattern(2)
{
int i;
shading = shadingA;
for (i = 0; i < 6; ++i) {
matrix[i] = matrixA[i];
}
}
|
CWE-189
| 973 | 11,575 |
77008709610443425088408280716717010242
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
int rotateA, GBool upsideDown) {
double kx, ky;
hDPI = hDPIA;
vDPI = vDPIA;
rotate = rotateA;
px1 = pageBox->x1;
py1 = pageBox->y1;
px2 = pageBox->x2;
py2 = pageBox->y2;
kx = hDPI / 72.0;
ky = vDPI / 72.0;
if (rotate == 90) {
ctm[0] = 0;
ctm[1] = upsideDown ? ky : -ky;
ctm[2] = kx;
ctm[3] = 0;
ctm[4] = -kx * py1;
ctm[5] = ky * (upsideDown ? -px1 : px2);
pageWidth = kx * (py2 - py1);
pageHeight = ky * (px2 - px1);
} else if (rotate == 180) {
ctm[0] = -kx;
ctm[1] = 0;
ctm[2] = 0;
ctm[3] = upsideDown ? ky : -ky;
ctm[4] = kx * px2;
ctm[5] = ky * (upsideDown ? -py1 : py2);
pageWidth = kx * (px2 - px1);
pageHeight = ky * (py2 - py1);
} else if (rotate == 270) {
ctm[0] = 0;
ctm[1] = upsideDown ? -ky : ky;
ctm[2] = -kx;
ctm[3] = 0;
ctm[4] = kx * py2;
ctm[5] = ky * (upsideDown ? px2 : -px1);
pageWidth = kx * (py2 - py1);
pageHeight = ky * (px2 - px1);
} else {
ctm[0] = kx;
ctm[1] = 0;
ctm[2] = 0;
ctm[3] = upsideDown ? -ky : ky;
ctm[4] = -kx * px1;
ctm[5] = ky * (upsideDown ? py2 : -py1);
pageWidth = kx * (px2 - px1);
pageHeight = ky * (py2 - py1);
}
fillColorSpace = new GfxDeviceGrayColorSpace();
strokeColorSpace = new GfxDeviceGrayColorSpace();
fillColor.c[0] = 0;
strokeColor.c[0] = 0;
fillPattern = NULL;
strokePattern = NULL;
blendMode = gfxBlendNormal;
fillOpacity = 1;
strokeOpacity = 1;
fillOverprint = gFalse;
strokeOverprint = gFalse;
transfer[0] = transfer[1] = transfer[2] = transfer[3] = NULL;
lineWidth = 1;
lineDash = NULL;
lineDashLength = 0;
lineDashStart = 0;
flatness = 1;
lineJoin = 0;
lineCap = 0;
miterLimit = 10;
strokeAdjust = gFalse;
font = NULL;
fontSize = 0;
textMat[0] = 1; textMat[1] = 0;
textMat[2] = 0; textMat[3] = 1;
textMat[4] = 0; textMat[5] = 0;
charSpace = 0;
wordSpace = 0;
horizScaling = 1;
leading = 0;
rise = 0;
render = 0;
path = new GfxPath();
curX = curY = 0;
lineX = lineY = 0;
clipXMin = 0;
clipYMin = 0;
clipXMax = pageWidth;
clipYMax = pageHeight;
saved = NULL;
#ifdef USE_CMS
GfxColorSpace::setupColorProfiles();
#endif
}
|
CWE-189
| 974 | 11,576 |
301195628741282574618605209737556303060
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxState::GfxState(GfxState *state) {
int i;
memcpy(this, state, sizeof(GfxState));
if (fillColorSpace) {
fillColorSpace = state->fillColorSpace->copy();
}
if (strokeColorSpace) {
strokeColorSpace = state->strokeColorSpace->copy();
}
if (fillPattern) {
fillPattern = state->fillPattern->copy();
}
if (strokePattern) {
strokePattern = state->strokePattern->copy();
}
for (i = 0; i < 4; ++i) {
if (transfer[i]) {
transfer[i] = state->transfer[i]->copy();
}
}
if (lineDashLength > 0) {
lineDash = (double *)gmallocn(lineDashLength, sizeof(double));
memcpy(lineDash, state->lineDash, lineDashLength * sizeof(double));
}
if (font)
font->incRefCnt();
saved = NULL;
}
|
CWE-189
| 975 | 11,577 |
201237744730877945536808845048192579010
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxSubpath::GfxSubpath(GfxSubpath *subpath) {
size = subpath->size;
n = subpath->n;
x = (double *)gmallocn(size, sizeof(double));
y = (double *)gmallocn(size, sizeof(double));
curve = (GBool *)gmallocn(size, sizeof(GBool));
memcpy(x, subpath->x, n * sizeof(double));
memcpy(y, subpath->y, n * sizeof(double));
memcpy(curve, subpath->curve, n * sizeof(GBool));
closed = subpath->closed;
}
|
CWE-189
| 977 | 11,578 |
75884924688082857479450600562854698699
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxTilingPattern::GfxTilingPattern(int paintTypeA, int tilingTypeA,
double *bboxA, double xStepA, double yStepA,
Object *resDictA, double *matrixA,
Object *contentStreamA):
GfxPattern(1)
{
int i;
paintType = paintTypeA;
tilingType = tilingTypeA;
for (i = 0; i < 4; ++i) {
bbox[i] = bboxA[i];
}
xStep = xStepA;
yStep = yStepA;
resDictA->copy(&resDict);
for (i = 0; i < 6; ++i) {
matrix[i] = matrixA[i];
}
contentStreamA->copy(&contentStream);
}
|
CWE-189
| 978 | 11,579 |
188322185086157200882907447400399102242
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxPath::append(GfxPath *path) {
int i;
if (n + path->n > size) {
size = n + path->n;
subpaths = (GfxSubpath **)
greallocn(subpaths, size, sizeof(GfxSubpath *));
}
for (i = 0; i < path->n; ++i) {
subpaths[n++] = path->subpaths[i]->copy();
}
justMoved = gFalse;
}
|
CWE-189
| 979 | 11,580 |
117031719438118709404444097000256070341
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxState::clearPath() {
delete path;
path = new GfxPath();
}
|
CWE-189
| 980 | 11,581 |
51170429306624750846423977336955592404
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxState::clip() {
double xMin, yMin, xMax, yMax, x, y;
GfxSubpath *subpath;
int i, j;
xMin = xMax = yMin = yMax = 0; // make gcc happy
for (i = 0; i < path->getNumSubpaths(); ++i) {
subpath = path->getSubpath(i);
for (j = 0; j < subpath->getNumPoints(); ++j) {
transform(subpath->getX(j), subpath->getY(j), &x, &y);
if (i == 0 && j == 0) {
xMin = xMax = x;
yMin = yMax = y;
} else {
if (x < xMin) {
xMin = x;
} else if (x > xMax) {
xMax = x;
}
if (y < yMin) {
yMin = y;
} else if (y > yMax) {
yMax = y;
}
}
}
}
if (xMin > clipXMin) {
clipXMin = xMin;
}
if (yMin > clipYMin) {
clipYMin = yMin;
}
if (xMax < clipXMax) {
clipXMax = xMax;
}
if (yMax < clipYMax) {
clipYMax = yMax;
}
}
|
CWE-189
| 981 | 11,582 |
134084681698156269314198423214178701633
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
static inline GfxColorComp clip01(GfxColorComp x) {
return (x < 0) ? 0 : (x > gfxColorComp1) ? gfxColorComp1 : x;
}
|
CWE-189
| 982 | 11,583 |
291742489146430331605010220509234770304
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
static inline double clip01(double x) {
return (x < 0) ? 0 : (x > 1) ? 1 : x;
}
|
CWE-189
| 983 | 11,584 |
274423917874487047577871746788389725485
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxState::clipToStrokePath() {
double xMin, yMin, xMax, yMax, x, y, t0, t1;
GfxSubpath *subpath;
int i, j;
xMin = xMax = yMin = yMax = 0; // make gcc happy
for (i = 0; i < path->getNumSubpaths(); ++i) {
subpath = path->getSubpath(i);
for (j = 0; j < subpath->getNumPoints(); ++j) {
transform(subpath->getX(j), subpath->getY(j), &x, &y);
if (i == 0 && j == 0) {
xMin = xMax = x;
yMin = yMax = y;
} else {
if (x < xMin) {
xMin = x;
} else if (x > xMax) {
xMax = x;
}
if (y < yMin) {
yMin = y;
} else if (y > yMax) {
yMax = y;
}
}
}
}
t0 = fabs(ctm[0]);
t1 = fabs(ctm[2]);
if (t0 > t1) {
xMin -= 0.5 * lineWidth * t0;
xMax += 0.5 * lineWidth * t0;
} else {
xMin -= 0.5 * lineWidth * t1;
xMax += 0.5 * lineWidth * t1;
}
t0 = fabs(ctm[0]);
t1 = fabs(ctm[3]);
if (t0 > t1) {
yMin -= 0.5 * lineWidth * t0;
yMax += 0.5 * lineWidth * t0;
} else {
yMin -= 0.5 * lineWidth * t1;
yMax += 0.5 * lineWidth * t1;
}
if (xMin > clipXMin) {
clipXMin = xMin;
}
if (yMin > clipYMin) {
clipYMin = yMin;
}
if (xMax < clipXMax) {
clipXMax = xMax;
}
if (yMax < clipYMax) {
clipYMax = yMax;
}
}
|
CWE-189
| 984 | 11,585 |
330340256355559694413577119354249017833
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxSubpath::close() {
if (x[n-1] != x[0] || y[n-1] != y[0]) {
lineTo(x[0], y[0]);
}
closed = gTrue;
}
|
CWE-189
| 985 | 11,586 |
89057509605390208696307728218289827478
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxState::concatCTM(double a, double b, double c,
double d, double e, double f) {
double a1 = ctm[0];
double b1 = ctm[1];
double c1 = ctm[2];
double d1 = ctm[3];
int i;
ctm[0] = a * a1 + b * c1;
ctm[1] = a * b1 + b * d1;
ctm[2] = c * a1 + d * c1;
ctm[3] = c * b1 + d * d1;
ctm[4] = e * a1 + f * c1 + ctm[4];
ctm[5] = e * b1 + f * d1 + ctm[5];
for (i = 0; i < 6; ++i) {
if (ctm[i] > 1e10) {
ctm[i] = 1e10;
} else if (ctm[i] < -1e10) {
ctm[i] = -1e10;
}
}
}
|
CWE-189
| 987 | 11,587 |
163782051822252323600888296119375121488
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxDeviceGrayColorSpace::copy() {
return new GfxDeviceGrayColorSpace();
}
|
CWE-189
| 988 | 11,588 |
181307160639969328759336614616120859791
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxDeviceCMYKColorSpace::copy() {
return new GfxDeviceCMYKColorSpace();
}
|
CWE-189
| 992 | 11,589 |
59386911029427106358556550679722698028
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxLabColorSpace::copy() {
GfxLabColorSpace *cs;
cs = new GfxLabColorSpace();
cs->whiteX = whiteX;
cs->whiteY = whiteY;
cs->whiteZ = whiteZ;
cs->blackX = blackX;
cs->blackY = blackY;
cs->blackZ = blackZ;
cs->aMin = aMin;
cs->aMax = aMax;
cs->bMin = bMin;
cs->bMax = bMax;
cs->kr = kr;
cs->kg = kg;
cs->kb = kb;
return cs;
}
|
CWE-189
| 993 | 11,590 |
301229340162262886917218517382844412190
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxICCBasedColorSpace::copy() {
GfxICCBasedColorSpace *cs;
int i;
cs = new GfxICCBasedColorSpace(nComps, alt->copy(), &iccProfileStream);
for (i = 0; i < 4; ++i) {
cs->rangeMin[i] = rangeMin[i];
cs->rangeMax[i] = rangeMax[i];
}
#ifdef USE_CMS
cs->transform = transform;
if (transform != NULL) transform->ref();
cs->lineTransform = lineTransform;
if (lineTransform != NULL) lineTransform->ref();
#endif
return cs;
}
|
CWE-189
| 994 | 11,591 |
85100215398535269919452543312422768234
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxIndexedColorSpace::copy() {
GfxIndexedColorSpace *cs;
cs = new GfxIndexedColorSpace(base->copy(), indexHigh);
memcpy(cs->lookup, lookup,
(indexHigh + 1) * base->getNComps() * sizeof(Guchar));
return cs;
}
|
CWE-189
| 995 | 11,592 |
125223092393875059730763238236048577949
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxSeparationColorSpace::copy() {
return new GfxSeparationColorSpace(name->copy(), alt->copy(), func->copy());
}
|
CWE-189
| 996 | 11,593 |
98759011673828895798553823250719372875
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxColorSpace *GfxPatternColorSpace::copy() {
return new GfxPatternColorSpace(under ? under->copy() :
(GfxColorSpace *)NULL);
}
|
CWE-189
| 998 | 11,594 |
89549488012653349379244097118746195880
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPattern *GfxTilingPattern::copy() {
return new GfxTilingPattern(paintType, tilingType, bbox, xStep, yStep,
&resDict, matrix, &contentStream);
}
|
CWE-189
| 999 | 11,595 |
242675157422444492122356549202712178367
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxPattern *GfxShadingPattern::copy() {
return new GfxShadingPattern(shading->copy(), matrix);
}
|
CWE-189
| 1,000 | 11,596 |
46532700648852329866455582853896256928
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading *GfxFunctionShading::copy() {
return new GfxFunctionShading(this);
}
|
CWE-189
| 1,001 | 11,597 |
285240743760490490315391439366176480842
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading *GfxAxialShading::copy() {
return new GfxAxialShading(this);
}
|
CWE-189
| 1,002 | 11,598 |
242321151178291716452815552986791824344
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading *GfxRadialShading::copy() {
return new GfxRadialShading(this);
}
|
CWE-189
| 1,003 | 11,599 |
391927753874288566672829350509820917
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading *GfxGouraudTriangleShading::copy() {
return new GfxGouraudTriangleShading(this);
}
|
CWE-189
| 1,004 | 11,600 |
56355655808958000063749851057948484353
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
GfxShading *GfxPatchMeshShading::copy() {
return new GfxPatchMeshShading(this);
}
|
CWE-189
| 1,005 | 11,601 |
240593728031337726684594983178822994592
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxSubpath::curveTo(double x1, double y1, double x2, double y2,
double x3, double y3) {
if (n+3 > size) {
size += 16;
x = (double *)greallocn(x, size, sizeof(double));
y = (double *)greallocn(y, size, sizeof(double));
curve = (GBool *)greallocn(curve, size, sizeof(GBool));
}
x[n] = x1;
y[n] = y1;
x[n+1] = x2;
y[n+1] = y2;
x[n+2] = x3;
y[n+2] = y3;
curve[n] = curve[n+1] = gTrue;
curve[n+2] = gFalse;
n += 3;
}
|
CWE-189
| 1,006 | 11,602 |
141459128412842828394797820338771468285
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
unsigned int GfxColorSpace::getCMSColorSpaceType(icColorSpaceSignature cs)
{
switch (cs) {
case icSigXYZData:
return PT_XYZ;
break;
case icSigLabData:
return PT_Lab;
break;
case icSigLuvData:
return PT_YUV;
break;
case icSigYCbCrData:
return PT_YCbCr;
break;
case icSigYxyData:
return PT_Yxy;
break;
case icSigRgbData:
return PT_RGB;
break;
case icSigGrayData:
return PT_GRAY;
break;
case icSigHsvData:
return PT_HSV;
break;
case icSigHlsData:
return PT_HLS;
break;
case icSigCmykData:
return PT_CMYK;
break;
case icSigCmyData:
return PT_CMY;
break;
case icSig2colorData:
case icSig3colorData:
case icSig4colorData:
case icSig5colorData:
case icSig6colorData:
case icSig7colorData:
case icSig8colorData:
case icSig9colorData:
case icSig10colorData:
case icSig11colorData:
case icSig12colorData:
case icSig13colorData:
case icSig14colorData:
case icSig15colorData:
default:
break;
}
return PT_RGB;
}
|
CWE-189
| 1,009 | 11,603 |
247200860025995316580511439504480415524
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
unsigned int GfxColorSpace::getCMSNChannels(icColorSpaceSignature cs)
{
switch (cs) {
case icSigXYZData:
case icSigLuvData:
case icSigLabData:
case icSigYCbCrData:
case icSigYxyData:
case icSigRgbData:
case icSigHsvData:
case icSigHlsData:
case icSigCmyData:
case icSig3colorData:
return 3;
break;
case icSigGrayData:
return 1;
break;
case icSigCmykData:
case icSig4colorData:
return 4;
break;
case icSig2colorData:
return 2;
break;
case icSig5colorData:
return 5;
break;
case icSig6colorData:
return 6;
break;
case icSig7colorData:
return 7;
break;
case icSig8colorData:
return 8;
break;
case icSig9colorData:
return 9;
break;
case icSig10colorData:
return 10;
break;
case icSig11colorData:
return 11;
break;
case icSig12colorData:
return 12;
break;
case icSig13colorData:
return 13;
break;
case icSig14colorData:
return 14;
break;
case icSig15colorData:
return 15;
default:
break;
}
return 3;
}
|
CWE-189
| 1,010 | 11,604 |
7552532660523169258888202215177881297
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
cmyk->c = cmyk->m = cmyk->y = 0;
cmyk->k = clip01(gfxColorComp1 - color->c[0]);
}
|
CWE-189
| 1,011 | 11,605 |
175405103480318734211729292289237067044
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
GfxColorComp c, m, y, k;
c = clip01(gfxColorComp1 - color->c[0]);
m = clip01(gfxColorComp1 - color->c[1]);
y = clip01(gfxColorComp1 - color->c[2]);
k = c;
if (m < k) {
k = m;
}
if (y < k) {
k = y;
}
cmyk->c = c - k;
cmyk->m = m - k;
cmyk->y = y - k;
cmyk->k = k;
}
|
CWE-189
| 1,013 | 11,606 |
220027267980159934382432533838880628754
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxCalRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
GfxRGB rgb;
GfxColorComp c, m, y, k;
#ifdef USE_CMS
if (XYZ2DisplayTransform != NULL && displayPixelType == PT_CMYK) {
double in[gfxColorMaxComps];
Guchar out[gfxColorMaxComps];
double X, Y, Z;
getXYZ(color,&X,&Y,&Z);
in[0] = clip01(X);
in[1] = clip01(Y);
in[2] = clip01(Z);
XYZ2DisplayTransform->doTransform(in,out,1);
cmyk->c = byteToCol(out[0]);
cmyk->m = byteToCol(out[1]);
cmyk->y = byteToCol(out[2]);
cmyk->k = byteToCol(out[3]);
return;
}
#endif
getRGB(color, &rgb);
c = clip01(gfxColorComp1 - rgb.r);
m = clip01(gfxColorComp1 - rgb.g);
y = clip01(gfxColorComp1 - rgb.b);
k = c;
if (m < k) {
k = m;
}
if (y < k) {
k = y;
}
cmyk->c = c - k;
cmyk->m = m - k;
cmyk->y = y - k;
cmyk->k = k;
}
|
CWE-189
| 1,014 | 11,607 |
289037990623533687086036401748949332478
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceCMYKColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
cmyk->c = clip01(color->c[0]);
cmyk->m = clip01(color->c[1]);
cmyk->y = clip01(color->c[2]);
cmyk->k = clip01(color->c[3]);
}
|
CWE-189
| 1,015 | 11,608 |
277463472921348752861795712494543367727
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
GfxRGB rgb;
GfxColorComp c, m, y, k;
#ifdef USE_CMS
if (XYZ2DisplayTransform != NULL && displayPixelType == PT_CMYK) {
double in[gfxColorMaxComps];
Guchar out[gfxColorMaxComps];
getXYZ(color, &in[0], &in[1], &in[2]);
XYZ2DisplayTransform->doTransform(in,out,1);
cmyk->c = byteToCol(out[0]);
cmyk->m = byteToCol(out[1]);
cmyk->y = byteToCol(out[2]);
cmyk->k = byteToCol(out[3]);
return;
}
#endif
getRGB(color, &rgb);
c = clip01(gfxColorComp1 - rgb.r);
m = clip01(gfxColorComp1 - rgb.g);
y = clip01(gfxColorComp1 - rgb.b);
k = c;
if (m < k) {
k = m;
}
if (y < k) {
k = y;
}
cmyk->c = c - k;
cmyk->m = m - k;
cmyk->y = y - k;
cmyk->k = k;
}
|
CWE-189
| 1,016 | 11,609 |
246335590745808715832956945692900021640
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
#ifdef USE_CMS
if (transform != NULL && displayPixelType == PT_CMYK) {
Guchar in[gfxColorMaxComps];
Guchar out[gfxColorMaxComps];
for (int i = 0;i < nComps;i++) {
in[i] = colToByte(color->c[i]);
}
transform->doTransform(in,out,1);
cmyk->c = byteToCol(out[0]);
cmyk->m = byteToCol(out[1]);
cmyk->y = byteToCol(out[2]);
cmyk->k = byteToCol(out[3]);
} else {
GfxRGB rgb;
GfxColorComp c, m, y, k;
getRGB(color,&rgb);
c = clip01(gfxColorComp1 - rgb.r);
m = clip01(gfxColorComp1 - rgb.g);
y = clip01(gfxColorComp1 - rgb.b);
k = c;
if (m < k) {
k = m;
}
if (y < k) {
k = y;
}
cmyk->c = c - k;
cmyk->m = m - k;
cmyk->y = y - k;
cmyk->k = k;
}
#else
alt->getCMYK(color, cmyk);
#endif
}
|
CWE-189
| 1,017 | 11,610 |
270927304794317078147145636988530158175
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxIndexedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
GfxColor color2;
base->getCMYK(mapColorToBase(color, &color2), cmyk);
}
|
CWE-189
| 1,018 | 11,611 |
300536244314281429272609271981786568962
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxSeparationColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
double x;
double c[gfxColorMaxComps];
GfxColor color2;
int i;
x = colToDbl(color->c[0]);
func->transform(&x, c);
for (i = 0; i < alt->getNComps(); ++i) {
color2.c[i] = dblToCol(c[i]);
}
alt->getCMYK(&color2, cmyk);
}
|
CWE-189
| 1,019 | 11,612 |
49222929815489187187235202843775440778
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceNColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
double x[gfxColorMaxComps], c[gfxColorMaxComps];
GfxColor color2;
int i;
for (i = 0; i < nComps; ++i) {
x[i] = colToDbl(color->c[i]);
}
func->transform(x, c);
for (i = 0; i < alt->getNComps(); ++i) {
color2.c[i] = dblToCol(c[i]);
}
alt->getCMYK(&color2, cmyk);
}
|
CWE-189
| 1,020 | 11,613 |
240216372094405418941339954908244048850
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxImageColorMap::getCMYK(Guchar *x, GfxCMYK *cmyk) {
GfxColor color;
int i;
if (colorSpace2) {
for (i = 0; i < nComps2; ++i) {
color.c[i] = lookup[i][x[0]];
}
colorSpace2->getCMYK(&color, cmyk);
} else {
for (i = 0; i < nComps; ++i) {
color.c[i] = lookup[i][x[i]];
}
colorSpace->getCMYK(&color, cmyk);
}
}
|
CWE-189
| 1,022 | 11,614 |
332920087928014367165019152143704202635
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxFunctionShading::getColor(double x, double y, GfxColor *color) {
double in[2], out[gfxColorMaxComps];
int i;
for (i = 0; i < gfxColorMaxComps; ++i) {
out[i] = 0;
}
in[0] = x;
in[1] = y;
for (i = 0; i < nFuncs; ++i) {
funcs[i]->transform(in, &out[i]);
}
for (i = 0; i < gfxColorMaxComps; ++i) {
color->c[i] = dblToCol(out[i]);
}
}
|
CWE-189
| 1,023 | 11,615 |
323561613258180621545729817395560113619
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxAxialShading::getColor(double t, GfxColor *color) {
double out[gfxColorMaxComps];
int i;
for (i = 0; i < gfxColorMaxComps; ++i) {
out[i] = 0;
}
for (i = 0; i < nFuncs; ++i) {
funcs[i]->transform(&t, &out[i]);
}
for (i = 0; i < gfxColorMaxComps; ++i) {
color->c[i] = dblToCol(out[i]);
}
}
|
CWE-189
| 1,024 | 11,616 |
270203633320448796180526743547799071933
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxRadialShading::getColor(double t, GfxColor *color) {
double out[gfxColorMaxComps];
int i;
for (i = 0; i < gfxColorMaxComps; ++i) {
out[i] = 0;
}
for (i = 0; i < nFuncs; ++i) {
funcs[i]->transform(&t, &out[i]);
}
for (i = 0; i < gfxColorMaxComps; ++i) {
color->c[i] = dblToCol(out[i]);
}
}
|
CWE-189
| 1,025 | 11,617 |
306380176882236971827491823351928312954
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxImageColorMap::getColor(Guchar *x, GfxColor *color) {
int maxPixel, i;
maxPixel = (1 << bits) - 1;
for (i = 0; i < nComps; ++i) {
color->c[i] = dblToCol(decodeLow[i] + (x[i] * decodeRange[i]) / maxPixel);
}
}
|
CWE-189
| 1,026 | 11,618 |
52163931227701105664369082375952084107
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
char *GfxColorSpace::getColorSpaceModeName(int idx) {
return gfxColorSpaceModeNames[idx];
}
|
CWE-189
| 1,027 | 11,619 |
263588058957940386224290659029307185951
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceGrayColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
|
CWE-189
| 1,028 | 11,620 |
243506463378869361212634424150847247455
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxCalGrayColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
|
CWE-189
| 1,029 | 11,621 |
245922340703146896622742478782822315562
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceRGBColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
color->c[2] = 0;
}
|
CWE-189
| 1,030 | 11,622 |
168429947530413162789660301374832385921
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxCalRGBColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
color->c[2] = 0;
}
|
CWE-189
| 1,031 | 11,623 |
60462439585440091598171739960972268563
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceCMYKColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
color->c[2] = 0;
color->c[3] = gfxColorComp1;
}
|
CWE-189
| 1,032 | 11,624 |
228331649538434629112061383615978917426
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxICCBasedColorSpace::getDefaultColor(GfxColor *color) {
int i;
for (i = 0; i < nComps; ++i) {
if (rangeMin[i] > 0) {
color->c[i] = dblToCol(rangeMin[i]);
} else if (rangeMax[i] < 0) {
color->c[i] = dblToCol(rangeMax[i]);
} else {
color->c[i] = 0;
}
}
}
|
CWE-189
| 1,034 | 11,625 |
308327854050446852142972199028428491760
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxIndexedColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
|
CWE-189
| 1,035 | 11,626 |
149910333323346276243631876530793997464
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxSeparationColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = gfxColorComp1;
}
|
CWE-189
| 1,036 | 11,627 |
175214401131555033976458689912567545233
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceNColorSpace::getDefaultColor(GfxColor *color) {
int i;
for (i = 0; i < nComps; ++i) {
color->c[i] = gfxColorComp1;
}
}
|
CWE-189
| 1,037 | 11,628 |
335470858521962445186823226446275627661
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxPatternColorSpace::getDefaultColor(GfxColor *color) {
color->c[0]=0;
}
|
CWE-189
| 1,038 | 11,629 |
197746729282853587943258601039793510880
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange,
int maxImgPixel) {
int i;
for (i = 0; i < getNComps(); ++i) {
decodeLow[i] = 0;
decodeRange[i] = 1;
}
}
|
CWE-189
| 1,039 | 11,630 |
244449463793999569043384358619948393362
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxLabColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange,
int maxImgPixel) {
decodeLow[0] = 0;
decodeRange[0] = 100;
decodeLow[1] = aMin;
decodeRange[1] = aMax - aMin;
decodeLow[2] = bMin;
decodeRange[2] = bMax - bMin;
}
|
CWE-189
| 1,040 | 11,631 |
52657656486281946124351042624669739675
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxICCBasedColorSpace::getDefaultRanges(double *decodeLow,
double *decodeRange,
int maxImgPixel) {
alt->getDefaultRanges(decodeLow, decodeRange, maxImgPixel);
#if 0
int i;
for (i = 0; i < nComps; ++i) {
decodeLow[i] = rangeMin[i];
decodeRange[i] = rangeMax[i] - rangeMin[i];
}
#endif
}
|
CWE-189
| 1,041 | 11,632 |
112058001263394368881176567921982043288
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxIndexedColorSpace::getDefaultRanges(double *decodeLow,
double *decodeRange,
int maxImgPixel) {
decodeLow[0] = 0;
decodeRange[0] = maxImgPixel;
}
|
CWE-189
| 1,042 | 11,633 |
61839314972247996065515849467917884430
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxState::getFontTransMat(double *m11, double *m12,
double *m21, double *m22) {
*m11 = (textMat[0] * ctm[0] + textMat[1] * ctm[2]) * fontSize;
*m12 = (textMat[0] * ctm[1] + textMat[1] * ctm[3]) * fontSize;
*m21 = (textMat[2] * ctm[0] + textMat[3] * ctm[2]) * fontSize;
*m22 = (textMat[2] * ctm[1] + textMat[3] * ctm[3]) * fontSize;
}
|
CWE-189
| 1,043 | 11,634 |
142176889889996592793569813870057578858
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) {
*gray = clip01(color->c[0]);
}
|
CWE-189
| 1,044 | 11,635 |
48605852996806192248907963112914286389
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxCalGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) {
GfxRGB rgb;
#ifdef USE_CMS
if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
Guchar out[gfxColorMaxComps];
double in[gfxColorMaxComps];
double X, Y, Z;
getXYZ(color,&X,&Y,&Z);
in[0] = clip01(X);
in[1] = clip01(Y);
in[2] = clip01(Z);
XYZ2DisplayTransform->doTransform(in,out,1);
*gray = byteToCol(out[0]);
return;
}
#endif
getRGB(color, &rgb);
*gray = clip01((GfxColorComp)(0.299 * rgb.r +
0.587 * rgb.g +
0.114 * rgb.b + 0.5));
}
|
CWE-189
| 1,045 | 11,636 |
251142114761554340508341696419986016168
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) {
*gray = clip01((GfxColorComp)(0.3 * color->c[0] +
0.59 * color->c[1] +
0.11 * color->c[2] + 0.5));
}
|
CWE-189
| 1,046 | 11,637 |
168111833039550184846102613281865394471
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxCalRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) {
GfxRGB rgb;
#ifdef USE_CMS
if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
Guchar out[gfxColorMaxComps];
double in[gfxColorMaxComps];
double X, Y, Z;
getXYZ(color,&X,&Y,&Z);
in[0] = clip01(X);
in[1] = clip01(Y);
in[2] = clip01(Z);
XYZ2DisplayTransform->doTransform(in,out,1);
*gray = byteToCol(out[0]);
return;
}
#endif
getRGB(color, &rgb);
*gray = clip01((GfxColorComp)(0.299 * rgb.r +
0.587 * rgb.g +
0.114 * rgb.b + 0.5));
}
|
CWE-189
| 1,047 | 11,638 |
201586505130509350155808916576142132593
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceCMYKColorSpace::getGray(GfxColor *color, GfxGray *gray) {
*gray = clip01((GfxColorComp)(gfxColorComp1 - color->c[3]
- 0.3 * color->c[0]
- 0.59 * color->c[1]
- 0.11 * color->c[2] + 0.5));
}
|
CWE-189
| 1,048 | 11,639 |
133603383260103276679539636066445761085
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxLabColorSpace::getGray(GfxColor *color, GfxGray *gray) {
GfxRGB rgb;
#ifdef USE_CMS
if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
Guchar out[gfxColorMaxComps];
double in[gfxColorMaxComps];
getXYZ(color, &in[0], &in[1], &in[2]);
XYZ2DisplayTransform->doTransform(in,out,1);
*gray = byteToCol(out[0]);
return;
}
#endif
getRGB(color, &rgb);
*gray = clip01((GfxColorComp)(0.299 * rgb.r +
0.587 * rgb.g +
0.114 * rgb.b + 0.5));
}
|
CWE-189
| 1,049 | 11,640 |
49028147524266575936960521298073542656
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxICCBasedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
#ifdef USE_CMS
if (transform != 0 && displayPixelType == PT_GRAY) {
Guchar in[gfxColorMaxComps];
Guchar out[gfxColorMaxComps];
for (int i = 0;i < nComps;i++) {
in[i] = colToByte(color->c[i]);
}
transform->doTransform(in,out,1);
*gray = byteToCol(out[0]);
} else {
GfxRGB rgb;
getRGB(color,&rgb);
*gray = clip01((GfxColorComp)(0.3 * rgb.r +
0.59 * rgb.g +
0.11 * rgb.b + 0.5));
}
#else
alt->getGray(color, gray);
#endif
}
|
CWE-189
| 1,050 | 11,641 |
57723496420127257717796315218598320202
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxIndexedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
GfxColor color2;
base->getGray(mapColorToBase(color, &color2), gray);
}
|
CWE-189
| 1,051 | 11,642 |
129968397867668991168066717354962401622
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxSeparationColorSpace::getGray(GfxColor *color, GfxGray *gray) {
double x;
double c[gfxColorMaxComps];
GfxColor color2;
int i;
x = colToDbl(color->c[0]);
func->transform(&x, c);
for (i = 0; i < alt->getNComps(); ++i) {
color2.c[i] = dblToCol(c[i]);
}
alt->getGray(&color2, gray);
}
|
CWE-189
| 1,052 | 11,643 |
338495168798303091020913781735092982311
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxDeviceNColorSpace::getGray(GfxColor *color, GfxGray *gray) {
double x[gfxColorMaxComps], c[gfxColorMaxComps];
GfxColor color2;
int i;
for (i = 0; i < nComps; ++i) {
x[i] = colToDbl(color->c[i]);
}
func->transform(x, c);
for (i = 0; i < alt->getNComps(); ++i) {
color2.c[i] = dblToCol(c[i]);
}
alt->getGray(&color2, gray);
}
|
CWE-189
| 1,053 | 11,644 |
168793346199680150649767420911029038116
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxPatternColorSpace::getGray(GfxColor *color, GfxGray *gray) {
*gray = 0;
}
|
CWE-189
| 1,054 | 11,645 |
201483735335333475041190758792696654872
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxImageColorMap::getGray(Guchar *x, GfxGray *gray) {
GfxColor color;
int i;
if (colorSpace2) {
for (i = 0; i < nComps2; ++i) {
color.c[i] = lookup[i][x[0]];
}
colorSpace2->getGray(&color, gray);
} else {
for (i = 0; i < nComps; ++i) {
color.c[i] = lookup[i][x[i]];
}
colorSpace->getGray(&color, gray);
}
}
|
CWE-189
| 1,055 | 11,646 |
196833943584649392708550119239088205607
| null | null | null |
poppler
|
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
| 0 |
void GfxColorSpace::getGrayLine(Guchar *in, unsigned char *out, int length) {
int i, j, n;
GfxColor color;
GfxGray gray;
n = getNComps();
for (i = 0; i < length; i++) {
for (j = 0; j < n; j++)
color.c[j] = in[i * n + j] * 256;
getGray (&color, &gray);
out[i] = colToByte(gray);
}
}
|
CWE-189
| 1,056 | 11,647 |
51448563687514031097718818330469564645
| null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.