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 |
---|---|---|---|---|---|---|---|---|---|---|
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GC( INS_ARG )
{
FT_ULong L;
FT_F26Dot6 R;
L = (FT_ULong)args[0];
if ( BOUNDS( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
else
R = 0;
}
else
{
if ( CUR.opcode & 1 )
R = CUR_fast_dualproj( &CUR.zp2.org[L] );
else
R = CUR_fast_project( &CUR.zp2.cur[L] );
}
args[0] = R;
}
|
CWE-119
| 10,108 | 16,805 |
199820978719086908731615313482717319019
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GETINFO( INS_ARG )
{
FT_Long K;
K = 0;
/* We return MS rasterizer version 1.7 for the font scaler. */
if ( ( args[0] & 1 ) != 0 )
K = 35;
/* Has the glyph been rotated? */
if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated )
K |= 0x80;
/* Has the glyph been stretched? */
if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched )
K |= 1 << 8;
/* Are we hinting for grayscale? */
if ( ( args[0] & 32 ) != 0 && CUR.grayscale )
K |= 1 << 12;
args[0] = K;
}
|
CWE-119
| 10,109 | 16,806 |
173313469355069713216328655614190610522
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GFV( INS_ARG )
{
DO_GFV
}
|
CWE-119
| 10,110 | 16,807 |
50929673282198279661972682002860650077
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GPV( INS_ARG )
{
DO_GPV
}
|
CWE-119
| 10,111 | 16,808 |
79438857749860030462402701160615631327
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GT( INS_ARG )
{
DO_GT
}
|
CWE-119
| 10,112 | 16,809 |
156513543108954173930914234691411031969
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_GTEQ( INS_ARG )
{
DO_GTEQ
}
|
CWE-119
| 10,113 | 16,810 |
206230547623941974913087698745672229496
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_Goto_CodeRange( EXEC_OP_ FT_Int aRange,
FT_ULong aIP )
{
TT_CodeRange* range;
if ( aRange < 1 || aRange > 3 )
{
CUR.error = TT_Err_Bad_Argument;
return FAILURE;
}
range = &CUR.codeRangeTable[aRange - 1];
if ( range->base == NULL ) /* invalid coderange */
{
CUR.error = TT_Err_Invalid_CodeRange;
return FAILURE;
}
/* NOTE: Because the last instruction of a program may be a CALL */
/* which will return to the first byte *after* the code */
/* range, we test for AIP <= Size, instead of AIP < Size. */
if ( aIP > range->size )
{
CUR.error = TT_Err_Code_Overflow;
return FAILURE;
}
CUR.code = range->base;
CUR.codeSize = range->size;
CUR.IP = aIP;
CUR.curRange = aRange;
return SUCCESS;
}
|
CWE-119
| 10,114 | 16,811 |
70389250801497835048653115858898221285
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_IDEF( INS_ARG )
{
TT_DefRecord* def;
TT_DefRecord* limit;
/* First of all, look for the same function in our table */
def = CUR.IDefs;
limit = def + CUR.numIDefs;
for ( ; def < limit; def++ )
if ( def->opc == (FT_ULong)args[0] )
break;
if ( def == limit )
{
/* check that there is enough room for a new instruction */
if ( CUR.numIDefs >= CUR.maxIDefs )
{
CUR.error = TT_Err_Too_Many_Instruction_Defs;
return;
}
CUR.numIDefs++;
}
/* opcode must be unsigned 8-bit integer */
if ( 0 > args[0] || args[0] > 0x00FF )
{
CUR.error = TT_Err_Too_Many_Instruction_Defs;
return;
}
def->opc = (FT_Byte)args[0];
def->start = CUR.IP + 1;
def->range = CUR.curRange;
def->active = TRUE;
if ( (FT_ULong)args[0] > CUR.maxIns )
CUR.maxIns = (FT_Byte)args[0];
/* Now skip the whole function definition. */
/* We don't allow nested IDEFs & FDEFs. */
while ( SKIP_Code() == SUCCESS )
{
switch ( CUR.opcode )
{
case 0x89: /* IDEF */
case 0x2C: /* FDEF */
CUR.error = TT_Err_Nested_DEFS;
return;
case 0x2D: /* ENDF */
return;
}
}
}
|
CWE-119
| 10,115 | 16,812 |
134526390500600737831866494393843373617
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_IF( INS_ARG )
{
FT_Int nIfs;
FT_Bool Out;
if ( args[0] != 0 )
return;
nIfs = 1;
Out = 0;
do
{
if ( SKIP_Code() == FAILURE )
return;
switch ( CUR.opcode )
{
case 0x58: /* IF */
nIfs++;
break;
case 0x1B: /* ELSE */
Out = FT_BOOL( nIfs == 1 );
break;
case 0x59: /* EIF */
nIfs--;
Out = FT_BOOL( nIfs == 0 );
break;
}
} while ( Out == 0 );
}
|
CWE-119
| 10,116 | 16,813 |
227881500878405091714373736918269859306
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_INSTCTRL( INS_ARG )
{
FT_Long K, L;
K = args[1];
L = args[0];
if ( K < 1 || K > 2 )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( L != 0 )
L = K;
CUR.GS.instruct_control = FT_BOOL(
( (FT_Byte)CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L );
}
|
CWE-119
| 10,117 | 16,814 |
144023311421558871047314469217285123465
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_IP( INS_ARG )
{
FT_F26Dot6 old_range, cur_range;
FT_Vector* orus_base;
FT_Vector* cur_base;
FT_Int twilight;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
/*
* We need to deal in a special way with the twilight zone.
* Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),
* for every n.
*/
twilight = CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0;
if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( twilight )
orus_base = &CUR.zp0.org[CUR.GS.rp1];
else
orus_base = &CUR.zp0.orus[CUR.GS.rp1];
cur_base = &CUR.zp0.cur[CUR.GS.rp1];
/* XXX: There are some glyphs in some braindead but popular */
/* fonts out there (e.g. [aeu]grave in monotype.ttf) */
/* calling IP[] with bad values of rp[12]. */
/* Do something sane when this odd thing happens. */
if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ||
BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) )
{
old_range = 0;
cur_range = 0;
}
else
{
if ( twilight )
old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2],
orus_base );
else
old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2],
orus_base );
cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
}
for ( ; CUR.GS.loop > 0; --CUR.GS.loop )
{
FT_UInt point = (FT_UInt)CUR.stack[--CUR.args];
FT_F26Dot6 org_dist, cur_dist, new_dist;
/* check point bounds */
if ( BOUNDS( point, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
continue;
}
if ( twilight )
org_dist = CUR_Func_dualproj( &CUR.zp2.org[point], orus_base );
else
org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base );
cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base );
if ( org_dist )
new_dist = ( old_range != 0 )
? TT_MULDIV( org_dist, cur_range, old_range )
: cur_dist;
else
new_dist = 0;
CUR_Func_move( &CUR.zp2, (FT_UShort)point, new_dist - cur_dist );
}
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
|
CWE-119
| 10,118 | 16,815 |
176209819364097690529824374851712652151
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_JROF( INS_ARG )
{
DO_JROF
}
|
CWE-119
| 10,121 | 16,816 |
16944994757024046437244071497363329739
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_JROT( INS_ARG )
{
DO_JROT
}
|
CWE-119
| 10,122 | 16,817 |
107125910552299491956960230031033139474
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_LOOPCALL( INS_ARG )
{
FT_ULong F;
TT_CallRec* pCrec;
TT_DefRecord* def;
/* first of all, check the index */
F = args[1];
if ( BOUNDS( F, CUR.maxFunc + 1 ) )
goto Fail;
/* Except for some old Apple fonts, all functions in a TrueType */
/* font are defined in increasing order, starting from 0. This */
/* means that we normally have */
/* */
/* CUR.maxFunc+1 == CUR.numFDefs */
/* CUR.FDefs[n].opc == n for n in 0..CUR.maxFunc */
/* */
/* If this isn't true, we need to look up the function table. */
def = CUR.FDefs + F;
if ( CUR.maxFunc + 1 != CUR.numFDefs || def->opc != F )
{
/* look up the FDefs table */
TT_DefRecord* limit;
def = CUR.FDefs;
limit = def + CUR.numFDefs;
while ( def < limit && def->opc != F )
def++;
if ( def == limit )
goto Fail;
}
/* check that the function is active */
if ( !def->active )
goto Fail;
/* check stack */
if ( CUR.callTop >= CUR.callSize )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
if ( args[0] > 0 )
{
pCrec = CUR.callStack + CUR.callTop;
pCrec->Caller_Range = CUR.curRange;
pCrec->Caller_IP = CUR.IP + 1;
pCrec->Cur_Count = (FT_Int)args[0];
pCrec->Cur_Restart = def->start;
CUR.callTop++;
INS_Goto_CodeRange( def->range, def->start );
CUR.step_ins = FALSE;
}
return;
Fail:
CUR.error = TT_Err_Invalid_Reference;
}
|
CWE-119
| 10,123 | 16,818 |
182997569380997637728070156237930533820
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_LT( INS_ARG )
{
DO_LT
}
|
CWE-119
| 10,124 | 16,819 |
70738472074028340765386374512163546321
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_LTEQ( INS_ARG )
{
DO_LTEQ
}
|
CWE-119
| 10,125 | 16,820 |
158088921406259489896230085687707506807
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MAX( INS_ARG )
{
DO_MAX
}
|
CWE-119
| 10,126 | 16,821 |
311399752700514486508281615115638706463
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MD( INS_ARG )
{
FT_UShort K, L;
FT_F26Dot6 D;
K = (FT_UShort)args[1];
L = (FT_UShort)args[0];
if( BOUNDS( L, CUR.zp0.n_points ) ||
BOUNDS( K, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
D = 0;
}
else
{
if ( CUR.opcode & 1 )
D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K );
else
{
FT_Vector* vec1 = CUR.zp0.orus + L;
FT_Vector* vec2 = CUR.zp1.orus + K;
if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
{
/* this should be faster */
D = CUR_Func_dualproj( vec1, vec2 );
D = TT_MULFIX( D, CUR.metrics.x_scale );
}
else
{
FT_Vector vec;
vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
D = CUR_fast_dualproj( &vec );
}
}
}
args[0] = D;
}
|
CWE-119
| 10,127 | 16,822 |
14949519983092761906621829268033664295
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MDAP( INS_ARG )
{
FT_UShort point;
FT_F26Dot6 cur_dist,
distance;
point = (FT_UShort)args[0];
if ( BOUNDS( point, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: Is there some undocumented feature while in the */
/* twilight zone? ? */
if ( ( CUR.opcode & 1 ) != 0 )
{
cur_dist = CUR_fast_project( &CUR.zp0.cur[point] );
distance = CUR_Func_round( cur_dist,
CUR.tt_metrics.compensations[0] ) - cur_dist;
}
else
distance = 0;
CUR_Func_move( &CUR.zp0, point, distance );
CUR.GS.rp0 = point;
CUR.GS.rp1 = point;
}
|
CWE-119
| 10,128 | 16,823 |
12996789146667721889839279518813525740
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MDRP( INS_ARG )
{
FT_UShort point;
FT_F26Dot6 org_dist, distance;
point = (FT_UShort)args[0];
if ( BOUNDS( point, CUR.zp1.n_points ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: Is there some undocumented feature while in the */
/* twilight zone? */
/* XXX: UNDOCUMENTED: twilight zone special case */
if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
{
FT_Vector* vec1 = &CUR.zp1.org[point];
FT_Vector* vec2 = &CUR.zp0.org[CUR.GS.rp0];
org_dist = CUR_Func_dualproj( vec1, vec2 );
}
else
{
FT_Vector* vec1 = &CUR.zp1.orus[point];
FT_Vector* vec2 = &CUR.zp0.orus[CUR.GS.rp0];
if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
{
/* this should be faster */
org_dist = CUR_Func_dualproj( vec1, vec2 );
org_dist = TT_MULFIX( org_dist, CUR.metrics.x_scale );
}
else
{
FT_Vector vec;
vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
org_dist = CUR_fast_dualproj( &vec );
}
}
/* single width cut-in test */
if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <
CUR.GS.single_width_cutin )
{
if ( org_dist >= 0 )
org_dist = CUR.GS.single_width_value;
else
org_dist = -CUR.GS.single_width_value;
}
/* round flag */
if ( ( CUR.opcode & 4 ) != 0 )
distance = CUR_Func_round(
org_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
else
distance = ROUND_None(
org_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
/* minimum distance flag */
if ( ( CUR.opcode & 8 ) != 0 )
{
if ( org_dist >= 0 )
{
if ( distance < CUR.GS.minimum_distance )
distance = CUR.GS.minimum_distance;
}
else
{
if ( distance > -CUR.GS.minimum_distance )
distance = -CUR.GS.minimum_distance;
}
}
/* now move the point */
org_dist = CUR_Func_project( CUR.zp1.cur + point,
CUR.zp0.cur + CUR.GS.rp0 );
CUR_Func_move( &CUR.zp1, point, distance - org_dist );
CUR.GS.rp1 = CUR.GS.rp0;
CUR.GS.rp2 = point;
if ( ( CUR.opcode & 16 ) != 0 )
CUR.GS.rp0 = point;
}
|
CWE-119
| 10,129 | 16,824 |
121242938556081635466881283148189339599
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MIAP( INS_ARG )
{
FT_ULong cvtEntry;
FT_UShort point;
FT_F26Dot6 distance,
org_dist;
cvtEntry = (FT_ULong)args[1];
point = (FT_UShort)args[0];
if ( BOUNDS( point, CUR.zp0.n_points ) ||
BOUNDS( cvtEntry, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: UNDOCUMENTED! */
/* */
/* The behaviour of an MIAP instruction is quite */
/* different when used in the twilight zone. */
/* */
/* First, no control value cut-in test is performed */
/* as it would fail anyway. Second, the original */
/* point, i.e. (org_x,org_y) of zp0.point, is set */
/* to the absolute, unrounded distance found in */
/* the CVT. */
/* */
/* This is used in the CVT programs of the Microsoft */
/* fonts Arial, Times, etc., in order to re-adjust */
/* some key font heights. It allows the use of the */
/* IP instruction in the twilight zone, which */
/* otherwise would be `illegal' according to the */
/* specification. */
/* */
/* We implement it with a special sequence for the */
/* twilight zone. This is a bad hack, but it seems */
/* to work. */
distance = CUR_Func_read_cvt( cvtEntry );
if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */
{
CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.x );
CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.y ),
CUR.zp0.cur[point] = CUR.zp0.org[point];
}
org_dist = CUR_fast_project( &CUR.zp0.cur[point] );
if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */
{
if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
distance = org_dist;
distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
}
CUR_Func_move( &CUR.zp0, point, distance - org_dist );
CUR.GS.rp0 = point;
CUR.GS.rp1 = point;
}
|
CWE-119
| 10,130 | 16,825 |
9804813342341425531074556344712550478
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MIN( INS_ARG )
{
DO_MIN
}
|
CWE-119
| 10,131 | 16,826 |
81899634977204538680278865302295678299
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MINDEX( INS_ARG )
{
FT_Long L, K;
L = args[0];
if ( L <= 0 || L > CUR.args )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
K = CUR.stack[CUR.args - L];
FT_ARRAY_MOVE( &CUR.stack[CUR.args - L ],
&CUR.stack[CUR.args - L + 1],
( L - 1 ) );
CUR.stack[CUR.args - 1] = K;
}
|
CWE-119
| 10,132 | 16,827 |
251914001164934870892420826518199771678
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MIRP( INS_ARG )
{
FT_UShort point;
FT_ULong cvtEntry;
FT_F26Dot6 cvt_dist,
distance,
cur_dist,
org_dist;
point = (FT_UShort)args[0];
cvtEntry = (FT_ULong)( args[1] + 1 );
/* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
if ( BOUNDS( point, CUR.zp1.n_points ) ||
BOUNDS( cvtEntry, CUR.cvtSize + 1 ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( !cvtEntry )
cvt_dist = 0;
else
cvt_dist = CUR_Func_read_cvt( cvtEntry - 1 );
/* single width test */
if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) <
CUR.GS.single_width_cutin )
{
if ( cvt_dist >= 0 )
cvt_dist = CUR.GS.single_width_value;
else
cvt_dist = -CUR.GS.single_width_value;
}
/* XXX: UNDOCUMENTED! -- twilight zone */
if ( CUR.GS.gep1 == 0 )
{
CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x +
TT_MulFix14( (FT_UInt32)cvt_dist,
CUR.GS.freeVector.x );
CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y +
TT_MulFix14( (FT_UInt32)cvt_dist,
CUR.GS.freeVector.y );
CUR.zp1.cur[point] = CUR.zp0.cur[point];
}
org_dist = CUR_Func_dualproj( &CUR.zp1.org[point],
&CUR.zp0.org[CUR.GS.rp0] );
cur_dist = CUR_Func_project ( &CUR.zp1.cur[point],
&CUR.zp0.cur[CUR.GS.rp0] );
/* auto-flip test */
if ( CUR.GS.auto_flip )
{
if ( ( org_dist ^ cvt_dist ) < 0 )
cvt_dist = -cvt_dist;
}
/* control value cutin and round */
if ( ( CUR.opcode & 4 ) != 0 )
{
/* XXX: UNDOCUMENTED! Only perform cut-in test when both points */
/* refer to the same zone. */
if ( CUR.GS.gep0 == CUR.GS.gep1 )
if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
cvt_dist = org_dist;
distance = CUR_Func_round(
cvt_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
}
else
distance = ROUND_None(
cvt_dist,
CUR.tt_metrics.compensations[CUR.opcode & 3] );
/* minimum distance test */
if ( ( CUR.opcode & 8 ) != 0 )
{
if ( org_dist >= 0 )
{
if ( distance < CUR.GS.minimum_distance )
distance = CUR.GS.minimum_distance;
}
else
{
if ( distance > -CUR.GS.minimum_distance )
distance = -CUR.GS.minimum_distance;
}
}
CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
CUR.GS.rp1 = CUR.GS.rp0;
if ( ( CUR.opcode & 16 ) != 0 )
CUR.GS.rp0 = point;
/* XXX: UNDOCUMENTED! */
CUR.GS.rp2 = point;
}
|
CWE-119
| 10,133 | 16,828 |
11750091700902325415102107068756729820
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MPPEM( INS_ARG )
{
DO_MPPEM
}
|
CWE-119
| 10,134 | 16,829 |
112602354652737235276814377775665176901
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MPS( INS_ARG )
{
DO_MPS
}
|
CWE-119
| 10,135 | 16,830 |
150533244520503271669944854947193028271
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MSIRP( INS_ARG )
{
FT_UShort point;
FT_F26Dot6 distance;
point = (FT_UShort)args[0];
if ( BOUNDS( point, CUR.zp1.n_points ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: UNDOCUMENTED! behaviour */
if ( CUR.GS.gep1 == 0 ) /* if the point that is to be moved */
/* is in twilight zone */
{
CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0];
CUR_Func_move_orig( &CUR.zp1, point, args[1] );
CUR.zp1.cur[point] = CUR.zp1.org[point];
}
distance = CUR_Func_project( CUR.zp1.cur + point,
CUR.zp0.cur + CUR.GS.rp0 );
CUR_Func_move( &CUR.zp1, point, args[1] - distance );
CUR.GS.rp1 = CUR.GS.rp0;
CUR.GS.rp2 = point;
if ( ( CUR.opcode & 1 ) != 0 )
CUR.GS.rp0 = point;
}
|
CWE-119
| 10,136 | 16,831 |
94984742930296328648918521537673400293
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_MUL( INS_ARG )
{
DO_MUL
}
|
CWE-119
| 10,137 | 16,832 |
317999838810273184230325788297347203449
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NEG( INS_ARG )
{
DO_NEG
}
|
CWE-119
| 10,138 | 16,833 |
257082344052655854509507498657230790713
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NEQ( INS_ARG )
{
DO_NEQ
}
|
CWE-119
| 10,139 | 16,834 |
302767854131804892504461232411904847817
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NOT( INS_ARG )
{
DO_NOT
}
|
CWE-119
| 10,140 | 16,835 |
224691101134123280691193070680391440331
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NPUSHB( INS_ARG )
{
FT_UShort L, K;
L = (FT_UShort)CUR.code[CUR.IP + 1];
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
for ( K = 1; K <= L; K++ )
args[K - 1] = CUR.code[CUR.IP + K + 1];
CUR.new_top += L;
}
|
CWE-119
| 10,141 | 16,836 |
101359665041566445176340520992419087396
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NPUSHW( INS_ARG )
{
FT_UShort L, K;
L = (FT_UShort)CUR.code[CUR.IP + 1];
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
CUR.IP += 2;
for ( K = 0; K < L; K++ )
args[K] = GET_ShortIns();
CUR.step_ins = FALSE;
CUR.new_top += L;
}
|
CWE-119
| 10,142 | 16,837 |
77490342275807876993596902579585624042
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_NROUND( INS_ARG )
{
DO_NROUND
}
|
CWE-119
| 10,143 | 16,838 |
54555573702800463717783743608204582823
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_ODD( INS_ARG )
{
DO_ODD
}
|
CWE-119
| 10,144 | 16,839 |
59870391402858628645144844019596083821
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_OR( INS_ARG )
{
DO_OR
}
|
CWE-119
| 10,145 | 16,840 |
75504767769483608058224975732082240406
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_POP( INS_ARG )
{
/* nothing to do */
}
|
CWE-119
| 10,146 | 16,841 |
287529026161251301873081248175076482668
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_PUSHB( INS_ARG )
{
FT_UShort L, K;
L = (FT_UShort)( CUR.opcode - 0xB0 + 1 );
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
for ( K = 1; K <= L; K++ )
args[K - 1] = CUR.code[CUR.IP + K];
}
|
CWE-119
| 10,147 | 16,842 |
31611843560869771273443260925051485468
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_PUSHW( INS_ARG )
{
FT_UShort L, K;
L = (FT_UShort)( CUR.opcode - 0xB8 + 1 );
if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
CUR.IP++;
for ( K = 0; K < L; K++ )
args[K] = GET_ShortIns();
CUR.step_ins = FALSE;
}
|
CWE-119
| 10,148 | 16,843 |
21132624512539096934015781690155823500
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_RCVT( INS_ARG )
{
DO_RCVT
}
|
CWE-119
| 10,149 | 16,844 |
69068469143835940384942929269498856614
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_RDTG( INS_ARG )
{
DO_RDTG
}
|
CWE-119
| 10,150 | 16,845 |
210116485631655023201101272594098719858
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_ROLL( INS_ARG )
{
FT_Long A, B, C;
FT_UNUSED_EXEC;
A = args[2];
B = args[1];
C = args[0];
args[2] = C;
args[1] = A;
args[0] = B;
}
|
CWE-119
| 10,152 | 16,846 |
290423908261946707765303201410489409333
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_ROUND( INS_ARG )
{
DO_ROUND
}
|
CWE-119
| 10,153 | 16,847 |
57956892022336591080217661595387794384
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_RS( INS_ARG )
{
DO_RS
}
|
CWE-119
| 10,154 | 16,848 |
274361835170641793513722452802522948175
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_RTG( INS_ARG )
{
DO_RTG
}
|
CWE-119
| 10,156 | 16,849 |
316720371587138263790887052200263550716
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_RTHG( INS_ARG )
{
DO_RTHG
}
|
CWE-119
| 10,157 | 16,850 |
285747044010347696520953032875569827375
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_S45ROUND( INS_ARG )
{
DO_S45ROUND
}
|
CWE-119
| 10,158 | 16,851 |
253794651319700810584935460864487420420
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SANGW( INS_ARG )
{
/* instruction not supported anymore */
}
|
CWE-119
| 10,159 | 16,852 |
88192916164987487074844239909171250814
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SCANCTRL( INS_ARG )
{
FT_Int A;
/* Get Threshold */
A = (FT_Int)( args[0] & 0xFF );
if ( A == 0xFF )
{
CUR.GS.scan_control = TRUE;
return;
}
else if ( A == 0 )
{
CUR.GS.scan_control = FALSE;
return;
}
if ( ( args[0] & 0x100 ) != 0 && CUR.tt_metrics.ppem <= A )
CUR.GS.scan_control = TRUE;
if ( ( args[0] & 0x200 ) != 0 && CUR.tt_metrics.rotated )
CUR.GS.scan_control = TRUE;
if ( ( args[0] & 0x400 ) != 0 && CUR.tt_metrics.stretched )
CUR.GS.scan_control = TRUE;
if ( ( args[0] & 0x800 ) != 0 && CUR.tt_metrics.ppem > A )
CUR.GS.scan_control = FALSE;
if ( ( args[0] & 0x1000 ) != 0 && CUR.tt_metrics.rotated )
CUR.GS.scan_control = FALSE;
if ( ( args[0] & 0x2000 ) != 0 && CUR.tt_metrics.stretched )
CUR.GS.scan_control = FALSE;
}
|
CWE-119
| 10,160 | 16,853 |
102669182896890174331390109821900834764
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SCANTYPE( INS_ARG )
{
if ( args[0] >= 0 )
CUR.GS.scan_type = (FT_Int)args[0];
}
|
CWE-119
| 10,161 | 16,854 |
114471030848096354377598291194762029459
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SCFS( INS_ARG )
{
FT_Long K;
FT_UShort L;
L = (FT_UShort)args[0];
if ( BOUNDS( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
K = CUR_fast_project( &CUR.zp2.cur[L] );
CUR_Func_move( &CUR.zp2, L, args[1] - K );
/* not part of the specs, but here for safety */
if ( CUR.GS.gep2 == 0 )
CUR.zp2.org[L] = CUR.zp2.cur[L];
}
|
CWE-119
| 10,162 | 16,855 |
179895480448047672759211821911124756124
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SDB( INS_ARG )
{
DO_SDB
}
|
CWE-119
| 10,164 | 16,856 |
92943029747059145123329675052670756809
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SDPVTL( INS_ARG )
{
FT_Long A, B, C;
FT_UShort p1, p2; /* was FT_Int in pas type ERROR */
p1 = (FT_UShort)args[1];
p2 = (FT_UShort)args[0];
if ( BOUNDS( p2, CUR.zp1.n_points ) ||
BOUNDS( p1, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
{
FT_Vector* v1 = CUR.zp1.org + p2;
FT_Vector* v2 = CUR.zp2.org + p1;
A = v1->x - v2->x;
B = v1->y - v2->y;
}
if ( ( CUR.opcode & 1 ) != 0 )
{
C = B; /* counter clockwise rotation */
B = A;
A = -C;
}
NORMalize( A, B, &CUR.GS.dualVector );
{
FT_Vector* v1 = CUR.zp1.cur + p2;
FT_Vector* v2 = CUR.zp2.cur + p1;
A = v1->x - v2->x;
B = v1->y - v2->y;
}
if ( ( CUR.opcode & 1 ) != 0 )
{
C = B; /* counter clockwise rotation */
B = A;
A = -C;
}
NORMalize( A, B, &CUR.GS.projVector );
GUESS_VECTOR( freeVector );
COMPUTE_Funcs();
}
|
CWE-119
| 10,165 | 16,857 |
323938940011266041063906959944163487621
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SDS( INS_ARG )
{
DO_SDS
}
|
CWE-119
| 10,166 | 16,858 |
335852864253304919440220113551962128545
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SFVFS( INS_ARG )
{
DO_SFVFS
}
|
CWE-119
| 10,167 | 16,859 |
46125505462032898925812711452810099280
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SFVTCA( INS_ARG )
{
DO_SFVTCA
}
|
CWE-119
| 10,168 | 16,860 |
206218933973266547414179539288841174249
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SFVTPV( INS_ARG )
{
DO_SFVTPV
}
|
CWE-119
| 10,170 | 16,861 |
165887956898237661211947094179961239312
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SHP( INS_ARG )
{
TT_GlyphZoneRec zp;
FT_UShort refp;
FT_F26Dot6 dx,
dy;
FT_UShort point;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
return;
while ( CUR.GS.loop > 0 )
{
CUR.args--;
point = (FT_UShort)CUR.stack[CUR.args];
if ( BOUNDS( point, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
}
else
/* XXX: UNDOCUMENTED! SHP touches the points */
MOVE_Zp2_Point( point, dx, dy, TRUE );
CUR.GS.loop--;
}
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
|
CWE-119
| 10,171 | 16,862 |
109229273499678310512485879060252201565
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SHPIX( INS_ARG )
{
FT_F26Dot6 dx, dy;
FT_UShort point;
if ( CUR.top < CUR.GS.loop + 1 )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
if ( CUR.face->unpatented_hinting )
{
if ( CUR.GS.both_x_axis )
{
dx = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
dy = 0;
}
else
{
dx = 0;
dy = TT_MulFix14( (FT_UInt32)args[0], 0x4000 );
}
}
else
#endif
{
dx = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.x );
dy = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.y );
}
while ( CUR.GS.loop > 0 )
{
CUR.args--;
point = (FT_UShort)CUR.stack[CUR.args];
if ( BOUNDS( point, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
}
else
MOVE_Zp2_Point( point, dx, dy, TRUE );
CUR.GS.loop--;
}
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
|
CWE-119
| 10,172 | 16,863 |
83403231167763112443985881881932609799
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SHZ( INS_ARG )
{
TT_GlyphZoneRec zp;
FT_UShort refp;
FT_F26Dot6 dx,
dy;
FT_UShort last_point, i;
if ( BOUNDS( args[0], 2 ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
return;
/* XXX: UNDOCUMENTED! SHZ doesn't move the phantom points. */
/* Twilight zone has no contours, so use `n_points'. */
/* Normal zone's `n_points' includes phantoms, so must */
/* use end of last contour. */
if ( CUR.GS.gep2 == 0 && CUR.zp2.n_points > 0 )
last_point = (FT_UShort)( CUR.zp2.n_points - 1 );
else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 )
last_point = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] );
else
last_point = 0;
/* XXX: UNDOCUMENTED! SHZ doesn't touch the points */
for ( i = 0; i <= last_point; i++ )
{
if ( zp.cur != CUR.zp2.cur || refp != i )
MOVE_Zp2_Point( i, dx, dy, FALSE );
}
}
|
CWE-119
| 10,173 | 16,864 |
306536047395712092493875345878263260574
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SLOOP( INS_ARG )
{
DO_SLOOP
}
|
CWE-119
| 10,174 | 16,865 |
48017933434198405380302719006653833029
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SMD( INS_ARG )
{
DO_SMD
}
|
CWE-119
| 10,175 | 16,866 |
149337730212650222968938554530119810245
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SPVFS( INS_ARG )
{
DO_SPVFS
}
|
CWE-119
| 10,176 | 16,867 |
119656509223095505719963248620490351631
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SPVTCA( INS_ARG )
{
DO_SPVTCA
}
|
CWE-119
| 10,177 | 16,868 |
322054237693701702058790035464615107266
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SPVTL( INS_ARG )
{
DO_SPVTL
}
|
CWE-119
| 10,178 | 16,869 |
243274749251919746694141419591188631967
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SROUND( INS_ARG )
{
DO_SROUND
}
|
CWE-119
| 10,179 | 16,870 |
204627160475243985178227839018137126237
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SRP0( INS_ARG )
{
DO_SRP0
}
|
CWE-119
| 10,180 | 16,871 |
275828859487455367176522654899947845822
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SRP2( INS_ARG )
{
DO_SRP2
}
|
CWE-119
| 10,181 | 16,872 |
3768469023505916668333715548003796011
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SSW( INS_ARG )
{
DO_SSW
}
|
CWE-119
| 10,182 | 16,873 |
182773830935200452171243342826975729713
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SSWCI( INS_ARG )
{
DO_SSWCI
}
|
CWE-119
| 10,183 | 16,874 |
126438064406640525926681297876816388088
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SVTCA( INS_ARG )
{
DO_SVTCA
}
|
CWE-119
| 10,185 | 16,875 |
132599951225547395037558597841365143219
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SWAP( INS_ARG )
{
DO_SWAP
}
|
CWE-119
| 10,186 | 16,876 |
338884849900597655329709806625997944622
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SZP0( INS_ARG )
{
switch ( (FT_Int)args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.GS.gep0 = (FT_UShort)args[0];
}
|
CWE-119
| 10,187 | 16,877 |
68930230467585307423763592556358522470
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SZP1( INS_ARG )
{
switch ( (FT_Int)args[0] )
{
case 0:
CUR.zp1 = CUR.twilight;
break;
case 1:
CUR.zp1 = CUR.pts;
break;
default:
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.GS.gep1 = (FT_UShort)args[0];
}
|
CWE-119
| 10,188 | 16,878 |
283699797118888986098912557677607065511
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SZP2( INS_ARG )
{
switch ( (FT_Int)args[0] )
{
case 0:
CUR.zp2 = CUR.twilight;
break;
case 1:
CUR.zp2 = CUR.pts;
break;
default:
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.GS.gep2 = (FT_UShort)args[0];
}
|
CWE-119
| 10,189 | 16,879 |
300145820635567642379418134907609190529
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SZPS( INS_ARG )
{
switch ( (FT_Int)args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.zp1 = CUR.zp0;
CUR.zp2 = CUR.zp0;
CUR.GS.gep0 = (FT_UShort)args[0];
CUR.GS.gep1 = (FT_UShort)args[0];
CUR.GS.gep2 = (FT_UShort)args[0];
}
|
CWE-119
| 10,190 | 16,880 |
146421719793044303884452631643657170381
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_SxVTL( EXEC_OP_ FT_UShort aIdx1,
FT_UShort aIdx2,
FT_Int aOpc,
FT_UnitVector* Vec )
{
FT_Long A, B, C;
FT_Vector* p1;
FT_Vector* p2;
if ( BOUNDS( aIdx1, CUR.zp2.n_points ) ||
BOUNDS( aIdx2, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return FAILURE;
}
p1 = CUR.zp1.cur + aIdx2;
p2 = CUR.zp2.cur + aIdx1;
A = p1->x - p2->x;
B = p1->y - p2->y;
if ( ( aOpc & 1 ) != 0 )
{
C = B; /* counter clockwise rotation */
B = A;
A = -C;
}
NORMalize( A, B, Vec );
return SUCCESS;
}
|
CWE-119
| 10,191 | 16,881 |
267818274509216657465079570906587343356
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_UNKNOWN( INS_ARG )
{
TT_DefRecord* def = CUR.IDefs;
TT_DefRecord* limit = def + CUR.numIDefs;
FT_UNUSED_ARG;
for ( ; def < limit; def++ )
{
if ( (FT_Byte)def->opc == CUR.opcode && def->active )
{
TT_CallRec* call;
if ( CUR.callTop >= CUR.callSize )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
call = CUR.callStack + CUR.callTop++;
call->Caller_Range = CUR.curRange;
call->Caller_IP = CUR.IP + 1;
call->Cur_Count = 1;
call->Cur_Restart = def->start;
INS_Goto_CodeRange( def->range, def->start );
CUR.step_ins = FALSE;
return;
}
}
CUR.error = TT_Err_Invalid_Opcode;
}
|
CWE-119
| 10,192 | 16,882 |
64163918176171003829546830884846514638
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_UTP( INS_ARG )
{
FT_UShort point;
FT_Byte mask;
point = (FT_UShort)args[0];
if ( BOUNDS( point, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
return;
}
mask = 0xFF;
if ( CUR.GS.freeVector.x != 0 )
mask &= ~FT_CURVE_TAG_TOUCH_X;
if ( CUR.GS.freeVector.y != 0 )
mask &= ~FT_CURVE_TAG_TOUCH_Y;
CUR.zp0.tags[point] &= mask;
}
|
CWE-119
| 10,193 | 16,883 |
311669429900569187293284384978422697875
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_WCVTF( INS_ARG )
{
DO_WCVTF
}
|
CWE-119
| 10,194 | 16,884 |
175953897902092198103874500518362834023
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_WCVTP( INS_ARG )
{
DO_WCVTP
}
|
CWE-119
| 10,195 | 16,885 |
14619162327872026411590929408511076721
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Ins_WS( INS_ARG )
{
DO_WS
}
|
CWE-119
| 10,196 | 16,886 |
47022742795427022983890562125034100487
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Move_CVT( EXEC_OP_ FT_ULong idx,
FT_F26Dot6 value )
{
CUR.cvt[idx] += value;
}
|
CWE-119
| 10,197 | 16,887 |
93507782884113982817811739444181641964
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Move_CVT_Stretched( EXEC_OP_ FT_ULong idx,
FT_F26Dot6 value )
{
CUR.cvt[idx] += FT_DivFix( value, CURRENT_Ratio() );
}
|
CWE-119
| 10,198 | 16,888 |
108442308389217992877970901753318123450
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Move_Zp2_Point( EXEC_OP_ FT_UShort point,
FT_F26Dot6 dx,
FT_F26Dot6 dy,
FT_Bool touch )
{
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
if ( CUR.face->unpatented_hinting )
{
if ( CUR.GS.both_x_axis )
{
CUR.zp2.cur[point].x += dx;
if ( touch )
CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
else
{
CUR.zp2.cur[point].y += dy;
if ( touch )
CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
return;
}
#endif
if ( CUR.GS.freeVector.x != 0 )
{
CUR.zp2.cur[point].x += dx;
if ( touch )
CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
if ( CUR.GS.freeVector.y != 0 )
{
CUR.zp2.cur[point].y += dy;
if ( touch )
CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
}
|
CWE-119
| 10,199 | 16,889 |
320070724783192876437375130758218773146
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Normalize( EXEC_OP_ FT_F26Dot6 Vx,
FT_F26Dot6 Vy,
FT_UnitVector* R )
{
FT_F26Dot6 W;
FT_Bool S1, S2;
FT_UNUSED_EXEC;
if ( FT_ABS( Vx ) < 0x10000L && FT_ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
W = TT_VecLen( Vx, Vy );
if ( W == 0 )
{
/* XXX: UNDOCUMENTED! It seems that it is possible to try */
/* to normalize the vector (0,0). Return immediately. */
return SUCCESS;
}
R->x = (FT_F2Dot14)FT_MulDiv( Vx, 0x4000L, W );
R->y = (FT_F2Dot14)FT_MulDiv( Vy, 0x4000L, W );
return SUCCESS;
}
W = TT_VecLen( Vx, Vy );
Vx = FT_MulDiv( Vx, 0x4000L, W );
Vy = FT_MulDiv( Vy, 0x4000L, W );
W = Vx * Vx + Vy * Vy;
/* Now, we want that Sqrt( W ) = 0x4000 */
/* Or 0x10000000 <= W < 0x10004000 */
if ( Vx < 0 )
{
Vx = -Vx;
S1 = TRUE;
}
else
S1 = FALSE;
if ( Vy < 0 )
{
Vy = -Vy;
S2 = TRUE;
}
else
S2 = FALSE;
while ( W < 0x10000000L )
{
/* We need to increase W by a minimal amount */
if ( Vx < Vy )
Vx++;
else
Vy++;
W = Vx * Vx + Vy * Vy;
}
while ( W >= 0x10004000L )
{
/* We need to decrease W by a minimal amount */
if ( Vx < Vy )
Vx--;
else
Vy--;
W = Vx * Vx + Vy * Vy;
}
/* Note that in various cases, we can only */
/* compute a Sqrt(W) of 0x3FFF, eg. Vx = Vy */
if ( S1 )
Vx = -Vx;
if ( S2 )
Vy = -Vy;
R->x = (FT_F2Dot14)Vx; /* Type conversion */
R->y = (FT_F2Dot14)Vy; /* Type conversion */
return SUCCESS;
}
|
CWE-119
| 10,200 | 16,890 |
200301852365810852894525056442880387412
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Project_x( EXEC_OP_ FT_Pos dx,
FT_Pos dy )
{
FT_UNUSED_EXEC;
FT_UNUSED( dy );
return dx;
}
|
CWE-119
| 10,201 | 16,891 |
213835301885390521039865121249673101768
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Project_y( EXEC_OP_ FT_Pos dx,
FT_Pos dy )
{
FT_UNUSED_EXEC;
FT_UNUSED( dx );
return dy;
}
|
CWE-119
| 10,202 | 16,892 |
296945211476109748214763262121555098629
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Read_CVT( EXEC_OP_ FT_ULong idx )
{
return CUR.cvt[idx];
}
|
CWE-119
| 10,203 | 16,893 |
153201692917964110188259770723093694235
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_Down_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
val = distance + compensation;
if ( distance && val > 0 )
val &= ~63;
else
val = 0;
}
else
{
val = -( ( compensation - distance ) & -64 );
if ( val > 0 )
val = 0;
}
return val;
}
|
CWE-119
| 10,205 | 16,894 |
317514450859642031906684626758426821491
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_None( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
val = distance + compensation;
if ( distance && val < 0 )
val = 0;
}
else
{
val = distance - compensation;
if ( val > 0 )
val = 0;
}
return val;
}
|
CWE-119
| 10,206 | 16,895 |
263325449160110697767199509659538153448
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_Super( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
if ( distance >= 0 )
{
val = ( distance - CUR.phase + CUR.threshold + compensation ) &
-CUR.period;
if ( distance && val < 0 )
val = 0;
val += CUR.phase;
}
else
{
val = -( ( CUR.threshold - CUR.phase - distance + compensation ) &
-CUR.period );
if ( val > 0 )
val = 0;
val -= CUR.phase;
}
return val;
}
|
CWE-119
| 10,207 | 16,896 |
133977830194023029737357297891470969110
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_Super_45( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
if ( distance >= 0 )
{
val = ( ( distance - CUR.phase + CUR.threshold + compensation ) /
CUR.period ) * CUR.period;
if ( distance && val < 0 )
val = 0;
val += CUR.phase;
}
else
{
val = -( ( ( CUR.threshold - CUR.phase - distance + compensation ) /
CUR.period ) * CUR.period );
if ( val > 0 )
val = 0;
val -= CUR.phase;
}
return val;
}
|
CWE-119
| 10,208 | 16,897 |
262592671888900447637089227822467841819
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_To_Double_Grid( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
val = distance + compensation + 16;
if ( distance && val > 0 )
val &= ~31;
else
val = 0;
}
else
{
val = -FT_PAD_ROUND( compensation - distance, 32 );
if ( val > 0 )
val = 0;
}
return val;
}
|
CWE-119
| 10,209 | 16,898 |
29365462623545172343033539640563451004
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
val = distance + compensation + 32;
if ( distance && val > 0 )
val &= ~63;
else
val = 0;
}
else
{
val = -FT_PIX_ROUND( compensation - distance );
if ( val > 0 )
val = 0;
}
return val;
}
|
CWE-119
| 10,210 | 16,899 |
136532477047349307600799939004663794077
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Round_Up_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation )
{
FT_F26Dot6 val;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
val = distance + compensation + 63;
if ( distance && val > 0 )
val &= ~63;
else
val = 0;
}
else
{
val = - FT_PIX_CEIL( compensation - distance );
if ( val > 0 )
val = 0;
}
return val;
}
|
CWE-119
| 10,212 | 16,900 |
135487851543326789198159811519180641623
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
SkipCode( EXEC_OP )
{
CUR.IP += CUR.length;
if ( CUR.IP < CUR.codeSize )
{
CUR.opcode = CUR.code[CUR.IP];
CUR.length = opcode_length[CUR.opcode];
if ( CUR.length < 0 )
{
if ( CUR.IP + 1 > CUR.codeSize )
goto Fail_Overflow;
CUR.length = 2 - CUR.length * CUR.code[CUR.IP + 1];
}
if ( CUR.IP + CUR.length <= CUR.codeSize )
return SUCCESS;
}
Fail_Overflow:
CUR.error = TT_Err_Code_Overflow;
return FAILURE;
}
|
CWE-119
| 10,214 | 16,901 |
329587569732227184880507291695007055244
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
Write_CVT( EXEC_OP_ FT_ULong idx,
FT_F26Dot6 value )
{
CUR.cvt[idx] = value;
}
|
CWE-119
| 10,215 | 16,902 |
236769228252578918359090128894708620192
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
_iup_worker_interpolate( IUP_Worker worker,
FT_UInt p1,
FT_UInt p2,
FT_UInt ref1,
FT_UInt ref2 )
{
FT_UInt i;
FT_F26Dot6 orus1, orus2, org1, org2, delta1, delta2;
if ( p1 > p2 )
return;
if ( BOUNDS( ref1, worker->max_points ) ||
BOUNDS( ref2, worker->max_points ) )
return;
orus1 = worker->orus[ref1].x;
orus2 = worker->orus[ref2].x;
if ( orus1 > orus2 )
{
FT_F26Dot6 tmp_o;
FT_UInt tmp_r;
tmp_o = orus1;
orus1 = orus2;
orus2 = tmp_o;
tmp_r = ref1;
ref1 = ref2;
ref2 = tmp_r;
}
org1 = worker->orgs[ref1].x;
org2 = worker->orgs[ref2].x;
delta1 = worker->curs[ref1].x - org1;
delta2 = worker->curs[ref2].x - org2;
if ( orus1 == orus2 )
{
/* simple shift of untouched points */
for ( i = p1; i <= p2; i++ )
{
FT_F26Dot6 x = worker->orgs[i].x;
if ( x <= org1 )
x += delta1;
else
x += delta2;
worker->curs[i].x = x;
}
}
else
{
FT_Fixed scale = 0;
FT_Bool scale_valid = 0;
/* interpolation */
for ( i = p1; i <= p2; i++ )
{
FT_F26Dot6 x = worker->orgs[i].x;
if ( x <= org1 )
x += delta1;
else if ( x >= org2 )
x += delta2;
else
{
if ( !scale_valid )
{
scale_valid = 1;
scale = TT_MULDIV( org2 + delta2 - ( org1 + delta1 ),
0x10000L, orus2 - orus1 );
}
x = ( org1 + delta1 ) +
TT_MULFIX( worker->orus[i].x - orus1, scale );
}
worker->curs[i].x = x;
}
}
}
|
CWE-119
| 10,216 | 16,903 |
120041791086882571896540442835323854059
| null | null | null |
savannah
|
888cd1843e935fe675cf2ac303116d4ed5b9d54b
| 0 |
_iup_worker_shift( IUP_Worker worker,
FT_UInt p1,
FT_UInt p2,
FT_UInt p )
{
FT_UInt i;
FT_F26Dot6 dx;
dx = worker->curs[p].x - worker->orgs[p].x;
if ( dx != 0 )
{
for ( i = p1; i < p; i++ )
worker->curs[i].x += dx;
for ( i = p + 1; i <= p2; i++ )
worker->curs[i].x += dx;
}
}
|
CWE-119
| 10,217 | 16,904 |
42197491649662800845387284326614700732
| null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.