idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
4,300 | static void Ins_MPS( INS_ARG )
{
args[0] = CUR.metrics.pointSize;
}
| DoS | 0 | static void Ins_MPS( INS_ARG )
{
args[0] = CUR.metrics.pointSize;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,301 | static void Ins_MSIRP( INS_ARG )
{
Int point;
TT_F26Dot6 distance;
point = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp1.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: Undocumented behaviour */
if ( CUR.GS.gep0 == 0 ) /* if in twiligh... | DoS | 0 | static void Ins_MSIRP( INS_ARG )
{
Int point;
TT_F26Dot6 distance;
point = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp1.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
/* XXX: Undocumented behaviour */
if ( CUR.GS.gep0 == 0 ) /* if in twiligh... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,302 | static void Ins_MUL( INS_ARG )
{ (void)exc;
args[0] = MulDiv_Round( args[0], args[1], 64L );
}
| DoS | 0 | static void Ins_MUL( INS_ARG )
{ (void)exc;
args[0] = MulDiv_Round( args[0], args[1], 64L );
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,303 | static void Ins_NEG( INS_ARG )
{ (void)exc;
args[0] = -args[0];
}
| DoS | 0 | static void Ins_NEG( INS_ARG )
{ (void)exc;
args[0] = -args[0];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,304 | static void Ins_NEQ( INS_ARG )
{ (void)exc;
if ( args[0] != args[1] )
args[0] = 1;
else
args[0] = 0;
}
| DoS | 0 | static void Ins_NEQ( INS_ARG )
{ (void)exc;
if ( args[0] != args[1] )
args[0] = 1;
else
args[0] = 0;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,305 | static void Ins_NOT( INS_ARG )
{ (void)exc;
if ( args[0] != 0 )
args[0] = 0;
else
args[0] = 1;
}
| DoS | 0 | static void Ins_NOT( INS_ARG )
{ (void)exc;
if ( args[0] != 0 )
args[0] = 0;
else
args[0] = 1;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,306 | static void Ins_NPUSHB( INS_ARG )
{
Int L, K;
L = (Int)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];
DBG_PRINT1(" %d", args[K... | DoS | 0 | static void Ins_NPUSHB( INS_ARG )
{
Int L, K;
L = (Int)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];
DBG_PRINT1(" %d", args[K... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,307 | static void Ins_NPUSHW( INS_ARG )
{
Int L, K;
L = (Int)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();
DBG_PRINT1(" %d", arg... | DoS | 0 | static void Ins_NPUSHW( INS_ARG )
{
Int L, K;
L = (Int)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();
DBG_PRINT1(" %d", arg... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,308 | static void Ins_NROUND( INS_ARG )
{
args[0] = Round_None( EXEC_ARGS
args[0],
CUR.metrics.compensations[CUR.opcode - 0x6C] );
}
| DoS | 0 | static void Ins_NROUND( INS_ARG )
{
args[0] = Round_None( EXEC_ARGS
args[0],
CUR.metrics.compensations[CUR.opcode - 0x6C] );
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,309 | static void Ins_ODD( INS_ARG )
{
if ( (CUR_Func_round( args[0], 0L ) & 127) == 64 )
args[0] = 1;
else
args[0] = 0;
}
| DoS | 0 | static void Ins_ODD( INS_ARG )
{
if ( (CUR_Func_round( args[0], 0L ) & 127) == 64 )
args[0] = 1;
else
args[0] = 0;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,310 | static void Ins_OR( INS_ARG )
{ (void)exc;
if ( args[0] != 0 || args[1] != 0 )
args[0] = 1;
else
args[0] = 0;
}
| DoS | 0 | static void Ins_OR( INS_ARG )
{ (void)exc;
if ( args[0] != 0 || args[1] != 0 )
args[0] = 1;
else
args[0] = 0;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,311 | static void Ins_POP( INS_ARG )
{ (void)exc; (void)args;
/* nothing to do */
}
| DoS | 0 | static void Ins_POP( INS_ARG )
{ (void)exc; (void)args;
/* nothing to do */
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,312 | static void Ins_PUSHB( INS_ARG )
{
Int L, K;
L = ((Int)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];
DBG_PRINT1(" %d", args[K -... | DoS | 0 | static void Ins_PUSHB( INS_ARG )
{
Int L, K;
L = ((Int)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];
DBG_PRINT1(" %d", args[K -... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,313 | static void Ins_PUSHW( INS_ARG )
{
Int L, K;
L = 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();
DBG_PRINT1(" %d", args[K]);
... | DoS | 0 | static void Ins_PUSHW( INS_ARG )
{
Int L, K;
L = 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();
DBG_PRINT1(" %d", args[K]);
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,314 | static void Ins_RCVT( INS_ARG )
{
int index;
if ( BOUNDS( args[0], CUR.cvtSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
index=args[0];
args[0] = CUR_Func_read_cvt( index );
DBG_PRINT3(" cvt[%d]%d:%d", index, CUR.cvt[index], args[0]);
}
| DoS | 0 | static void Ins_RCVT( INS_ARG )
{
int index;
if ( BOUNDS( args[0], CUR.cvtSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
index=args[0];
args[0] = CUR_Func_read_cvt( index );
DBG_PRINT3(" cvt[%d]%d:%d", index, CUR.cvt[index], args[0]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,315 | static void Ins_RDTG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_Down_To_Grid;
CUR.func_round = (TRound_Function)Round_Down_To_Grid;
}
| DoS | 0 | static void Ins_RDTG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_Down_To_Grid;
CUR.func_round = (TRound_Function)Round_Down_To_Grid;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,316 | static void Ins_ROLL( INS_ARG )
{
Long A, B, C;
(void)exc;
A = args[2];
B = args[1];
C = args[0];
args[2] = C;
args[1] = A;
args[0] = B;
}
| DoS | 0 | static void Ins_ROLL( INS_ARG )
{
Long A, B, C;
(void)exc;
A = args[2];
B = args[1];
C = args[0];
args[2] = C;
args[1] = A;
args[0] = B;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,317 | static void Ins_ROUND( INS_ARG )
{
args[0] = CUR_Func_round( args[0],
CUR.metrics.compensations[CUR.opcode - 0x68] );
}
| DoS | 0 | static void Ins_ROUND( INS_ARG )
{
args[0] = CUR_Func_round( args[0],
CUR.metrics.compensations[CUR.opcode - 0x68] );
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,318 | static void Ins_RS( INS_ARG )
{
if ( BOUNDS( args[0], CUR.storeSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
args[0] = CUR.storage[args[0]];
}
| DoS | 0 | static void Ins_RS( INS_ARG )
{
if ( BOUNDS( args[0], CUR.storeSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
args[0] = CUR.storage[args[0]];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,319 | static void Ins_RTDG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_To_Double_Grid;
CUR.func_round = (TRound_Function)Round_To_Double_Grid;
}
| DoS | 0 | static void Ins_RTDG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_To_Double_Grid;
CUR.func_round = (TRound_Function)Round_To_Double_Grid;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,320 | static void Ins_RUTG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_Up_To_Grid;
CUR.func_round = (TRound_Function)Round_Up_To_Grid;
}
| DoS | 0 | static void Ins_RUTG( INS_ARG )
{ (void)args;
CUR.GS.round_state = TT_Round_Up_To_Grid;
CUR.func_round = (TRound_Function)Round_Up_To_Grid;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,321 | static void Ins_SANGW( INS_ARG )
{ (void)exc; (void)args;
/* instruction not supported anymore */
}
| DoS | 0 | static void Ins_SANGW( INS_ARG )
{ (void)exc; (void)args;
/* instruction not supported anymore */
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,322 | static void Ins_SCANTYPE( INS_ARG )
{
/* For compatibility with future enhancements, */
/* we must ignore new modes */
if ( args[0] >= 0 && args[0] <= 5 )
{
if ( args[0] == 3 )
args[0] = 2;
CUR.GS.scan_type = (Int)args[0];
}
}
| DoS | 0 | static void Ins_SCANTYPE( INS_ARG )
{
/* For compatibility with future enhancements, */
/* we must ignore new modes */
if ( args[0] >= 0 && args[0] <= 5 )
{
if ( args[0] == 3 )
args[0] = 2;
CUR.GS.scan_type = (Int)args[0];
}
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,323 | static void Ins_SCFS( INS_ARG )
{
Long K;
Int L;
L = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp2.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
K = CUR_Func_project( CUR.zp2.cur_x[L],
CUR.zp2.cur_y[L] );
CUR_Func_move( &CU... | DoS | 0 | static void Ins_SCFS( INS_ARG )
{
Long K;
Int L;
L = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp2.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
K = CUR_Func_project( CUR.zp2.cur_x[L],
CUR.zp2.cur_y[L] );
CUR_Func_move( &CU... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,324 | static void Ins_SDB( INS_ARG )
{
CUR.GS.delta_base = (Int)args[0];
}
| DoS | 0 | static void Ins_SDB( INS_ARG )
{
CUR.GS.delta_base = (Int)args[0];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,325 | static void Ins_SDS( INS_ARG )
{
CUR.GS.delta_shift = (Int)args[0];
}
| DoS | 0 | static void Ins_SDS( INS_ARG )
{
CUR.GS.delta_shift = (Int)args[0];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,326 | static void Ins_SFVFS( INS_ARG )
{
Short S;
Long X, Y;
/* Only use low 16bits, then sign extend */
S = (Short)args[1];
Y = (Long)S;
S = (Short)args[0];
X = S;
if ( NORMalize( X, Y, &CUR.GS.freeVector ) == FAILURE )
return;
COMPUTE_Funcs();
}
| DoS | 0 | static void Ins_SFVFS( INS_ARG )
{
Short S;
Long X, Y;
/* Only use low 16bits, then sign extend */
S = (Short)args[1];
Y = (Long)S;
S = (Short)args[0];
X = S;
if ( NORMalize( X, Y, &CUR.GS.freeVector ) == FAILURE )
return;
COMPUTE_Funcs();
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,327 | static void Ins_SFVTL( INS_ARG )
{
if ( INS_SxVTL( (Int)(args[1]),
(Int)(args[0]),
CUR.opcode,
&CUR.GS.freeVector) == FAILURE )
return;
COMPUTE_Funcs();
}
| DoS | 0 | static void Ins_SFVTL( INS_ARG )
{
if ( INS_SxVTL( (Int)(args[1]),
(Int)(args[0]),
CUR.opcode,
&CUR.GS.freeVector) == FAILURE )
return;
COMPUTE_Funcs();
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,328 | static void Ins_SFVTPV( INS_ARG )
{ (void)args;
CUR.GS.freeVector = CUR.GS.projVector;
COMPUTE_Funcs();
}
| DoS | 0 | static void Ins_SFVTPV( INS_ARG )
{ (void)args;
CUR.GS.freeVector = CUR.GS.projVector;
COMPUTE_Funcs();
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,329 | static void Ins_SHZ( INS_ARG )
{
TGlyph_Zone zp;
Int refp;
TT_F26Dot6 dx,
dy;
Int last_point;
Long i;
if ( BOUNDS( args[0], 2 ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
... | DoS | 0 | static void Ins_SHZ( INS_ARG )
{
TGlyph_Zone zp;
Int refp;
TT_F26Dot6 dx,
dy;
Int last_point;
Long i;
if ( BOUNDS( args[0], 2 ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,330 | static void Ins_SMD( INS_ARG )
{
CUR.GS.minimum_distance = args[0];
}
| DoS | 0 | static void Ins_SMD( INS_ARG )
{
CUR.GS.minimum_distance = args[0];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,331 | static void Ins_SPVFS( INS_ARG )
{
Short S;
Long X, Y;
/* Only use low 16bits, then sign extend */
S = (Short)args[1];
Y = (Long)S;
S = (Short)args[0];
X = (Long)S;
if ( NORMalize( X, Y, &CUR.GS.projVector ) == FAILURE )
return;
CUR.GS.dualVector = CUR.GS.projVector;... | DoS | 0 | static void Ins_SPVFS( INS_ARG )
{
Short S;
Long X, Y;
/* Only use low 16bits, then sign extend */
S = (Short)args[1];
Y = (Long)S;
S = (Short)args[0];
X = (Long)S;
if ( NORMalize( X, Y, &CUR.GS.projVector ) == FAILURE )
return;
CUR.GS.dualVector = CUR.GS.projVector;... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,332 | static void Ins_SPVTCA( INS_ARG )
{
Short A, B;
(void)args;
if ( CUR.opcode & 1 )
A = 0x4000;
else
A = 0;
B = A ^ 0x4000;
CUR.GS.projVector.x = A;
CUR.GS.dualVector.x = A;
CUR.GS.projVector.y = B;
CUR.GS.dualVector.y = B;
COMPUTE_Funcs();
}
| DoS | 0 | static void Ins_SPVTCA( INS_ARG )
{
Short A, B;
(void)args;
if ( CUR.opcode & 1 )
A = 0x4000;
else
A = 0;
B = A ^ 0x4000;
CUR.GS.projVector.x = A;
CUR.GS.dualVector.x = A;
CUR.GS.projVector.y = B;
CUR.GS.dualVector.y = B;
COMPUTE_Funcs();
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,333 | static void Ins_SPVTL( INS_ARG )
{
if ( INS_SxVTL( args[1],
args[0],
CUR.opcode,
&CUR.GS.projVector) == FAILURE )
return;
CUR.GS.dualVector = CUR.GS.projVector;
COMPUTE_Funcs();
}
| DoS | 0 | static void Ins_SPVTL( INS_ARG )
{
if ( INS_SxVTL( args[1],
args[0],
CUR.opcode,
&CUR.GS.projVector) == FAILURE )
return;
CUR.GS.dualVector = CUR.GS.projVector;
COMPUTE_Funcs();
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,334 | static void Ins_SROUND( INS_ARG )
{
SET_SuperRound( 0x4000L, args[0] );
CUR.GS.round_state = TT_Round_Super;
CUR.func_round = (TRound_Function)Round_Super;
}
| DoS | 0 | static void Ins_SROUND( INS_ARG )
{
SET_SuperRound( 0x4000L, args[0] );
CUR.GS.round_state = TT_Round_Super;
CUR.func_round = (TRound_Function)Round_Super;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,335 | static void Ins_SRP0( INS_ARG )
{
CUR.GS.rp0 = (Int)(args[0]);
}
| DoS | 0 | static void Ins_SRP0( INS_ARG )
{
CUR.GS.rp0 = (Int)(args[0]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,336 | static void Ins_SRP1( INS_ARG )
{
CUR.GS.rp1 = (Int)(args[0]);
}
| DoS | 0 | static void Ins_SRP1( INS_ARG )
{
CUR.GS.rp1 = (Int)(args[0]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,337 | static void Ins_SSW( INS_ARG )
{
/* XXX : Undocumented or bug in the Windows engine ? */
/* */
/* It seems that the value that is read here is */
/* expressed in 16.16 format, rather than in */
/* font units.. ... | DoS | 0 | static void Ins_SSW( INS_ARG )
{
/* XXX : Undocumented or bug in the Windows engine ? */
/* */
/* It seems that the value that is read here is */
/* expressed in 16.16 format, rather than in */
/* font units.. ... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,338 | static void Ins_SSWCI( INS_ARG )
{
CUR.GS.single_width_cutin = (TT_F26Dot6)args[0];
}
| DoS | 0 | static void Ins_SSWCI( INS_ARG )
{
CUR.GS.single_width_cutin = (TT_F26Dot6)args[0];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,339 | static void Ins_SUB( INS_ARG )
{ (void)exc;
args[0] -= args[1];
}
| DoS | 0 | static void Ins_SUB( INS_ARG )
{ (void)exc;
args[0] -= args[1];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,340 | static void Ins_SVTCA( INS_ARG )
{
Short A, B;
(void)args;
if ( CUR.opcode & 1 )
A = 0x4000;
else
A = 0;
B = A ^ 0x4000;
CUR.GS.freeVector.x = A;
CUR.GS.projVector.x = A;
CUR.GS.dualVector.x = A;
CUR.GS.freeVector.y = B;
CUR.GS.projVector.y = B;
CUR.... | DoS | 0 | static void Ins_SVTCA( INS_ARG )
{
Short A, B;
(void)args;
if ( CUR.opcode & 1 )
A = 0x4000;
else
A = 0;
B = A ^ 0x4000;
CUR.GS.freeVector.x = A;
CUR.GS.projVector.x = A;
CUR.GS.dualVector.x = A;
CUR.GS.freeVector.y = B;
CUR.GS.projVector.y = B;
CUR.... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,341 | static void Ins_SWAP( INS_ARG )
{
Long L;
(void)exc;
L = args[0];
args[0] = args[1];
args[1] = L;
}
| DoS | 0 | static void Ins_SWAP( INS_ARG )
{
Long L;
(void)exc;
L = args[0];
args[0] = args[1];
args[1] = L;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,342 | static void Ins_SZP0( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
break;
}
CUR.GS.gep0 = (Int)(args[0]);
}
| DoS | 0 | static void Ins_SZP0( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
break;
}
CUR.GS.gep0 = (Int)(args[0]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,343 | static void Ins_SZPS( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.zp1 = CUR.zp0;
CUR.zp2 = CUR.zp0;
CUR.GS.gep0 = (I... | DoS | 0 | static void Ins_SZPS( INS_ARG )
{
switch ( args[0] )
{
case 0:
CUR.zp0 = CUR.twilight;
break;
case 1:
CUR.zp0 = CUR.pts;
break;
default:
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.zp1 = CUR.zp0;
CUR.zp2 = CUR.zp0;
CUR.GS.gep0 = (I... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,344 | static Bool Ins_SxVTL( EXEC_OPS Int aIdx1,
Int aIdx2,
Int aOpc,
TT_UnitVector* Vec )
{
Long A, B, C;
if ( BOUNDS( aIdx1, CUR.zp2.n_points ) ||
BOUNDS(... | DoS | 0 | static Bool Ins_SxVTL( EXEC_OPS Int aIdx1,
Int aIdx2,
Int aOpc,
TT_UnitVector* Vec )
{
Long A, B, C;
if ( BOUNDS( aIdx1, CUR.zp2.n_points ) ||
BOUNDS(... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,345 | static void Ins_UNKNOWN( INS_ARG )
{ /* Rewritten by igorm. */
Byte i;
TDefRecord* def;
PCallRecord call;
# if 0 /* The condition below appears always false
due to limited range of data type
- skip it to quiet a compiler warning. */
if (CUR.opcode > sizeof(C... | DoS | 0 | static void Ins_UNKNOWN( INS_ARG )
{ /* Rewritten by igorm. */
Byte i;
TDefRecord* def;
PCallRecord call;
# if 0 /* The condition below appears always false
due to limited range of data type
- skip it to quiet a compiler warning. */
if (CUR.opcode > sizeof(C... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,346 | static void Ins_UTP( INS_ARG )
{
Byte mask;
if ( BOUNDS( args[0], CUR.zp0.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
mask = 0xFF;
if ( CUR.GS.freeVector.x != 0 )
mask &= ~TT_Flag_Touched_X;
if ( CUR.GS.freeVector.y != 0 )
mask &= ~TT_Flag... | DoS | 0 | static void Ins_UTP( INS_ARG )
{
Byte mask;
if ( BOUNDS( args[0], CUR.zp0.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
mask = 0xFF;
if ( CUR.GS.freeVector.x != 0 )
mask &= ~TT_Flag_Touched_X;
if ( CUR.GS.freeVector.y != 0 )
mask &= ~TT_Flag... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,347 | static void Ins_WCVTF( INS_ARG )
{
#ifdef DEBUG
int ov;
#endif
if ( BOUNDS( args[0], CUR.cvtSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
#ifdef DEBUG
ov = CUR.cvt[args[0]];
#endif
CUR.cvt[args[0]] = FUnits_To_Pixels( EXEC_ARGS args[1] );
#ifdef DEBUG
DBG_PRIN... | DoS | 0 | static void Ins_WCVTF( INS_ARG )
{
#ifdef DEBUG
int ov;
#endif
if ( BOUNDS( args[0], CUR.cvtSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
#ifdef DEBUG
ov = CUR.cvt[args[0]];
#endif
CUR.cvt[args[0]] = FUnits_To_Pixels( EXEC_ARGS args[1] );
#ifdef DEBUG
DBG_PRIN... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,348 | static void Ins_WS( INS_ARG )
{
if ( BOUNDS( args[0], CUR.storeSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.storage[args[0]] = args[1];
}
| DoS | 0 | static void Ins_WS( INS_ARG )
{
if ( BOUNDS( args[0], CUR.storeSize ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
CUR.storage[args[0]] = args[1];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,349 | static void Interp( Int p1, Int p2,
Int ref1, Int ref2,
struct LOC_Ins_IUP* LINK )
{
Long i;
TT_F26Dot6 x, x1, x2, d1, d2;
if ( p1 > p2 )
return;
x1 = LINK->orgs[ref1];
d1 = LINK->curs[ref1] - LINK->orgs[ref1];
x2 = LINK->or... | DoS | 0 | static void Interp( Int p1, Int p2,
Int ref1, Int ref2,
struct LOC_Ins_IUP* LINK )
{
Long i;
TT_F26Dot6 x, x1, x2, d1, d2;
if ( p1 > p2 )
return;
x1 = LINK->orgs[ref1];
d1 = LINK->curs[ref1] - LINK->orgs[ref1];
x2 = LINK->or... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,350 | static void Move_CVT( EXEC_OPS Int index, TT_F26Dot6 value )
{
int ov=CUR.cvt[index];
(void)ov; /* Quiet compiler warning in release build. */
CUR.cvt[index] += value;
DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
}
| DoS | 0 | static void Move_CVT( EXEC_OPS Int index, TT_F26Dot6 value )
{
int ov=CUR.cvt[index];
(void)ov; /* Quiet compiler warning in release build. */
CUR.cvt[index] += value;
DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,351 | static void Move_Zp2_Point( EXEC_OPS
Long point,
TT_F26Dot6 dx,
TT_F26Dot6 dy,
Bool touch )
{
if ( CUR.GS.freeVector.x != 0 )
{
CUR.zp2.cur_x[point] += dx;
... | DoS | 0 | static void Move_Zp2_Point( EXEC_OPS
Long point,
TT_F26Dot6 dx,
TT_F26Dot6 dy,
Bool touch )
{
if ( CUR.GS.freeVector.x != 0 )
{
CUR.zp2.cur_x[point] += dx;
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,352 | static Bool Normalize( EXEC_OPS TT_F26Dot6 Vx,
TT_F26Dot6 Vy,
TT_UnitVector* R )
{
TT_F26Dot6 W;
Bool S1, S2;
if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
... | DoS | 0 | static Bool Normalize( EXEC_OPS TT_F26Dot6 Vx,
TT_F26Dot6 Vy,
TT_UnitVector* R )
{
TT_F26Dot6 W;
Bool S1, S2;
if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,353 | static TT_F26Dot6 Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy )
{
THROW_PATENTED;
return 0;
}
| DoS | 0 | static TT_F26Dot6 Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy )
{
THROW_PATENTED;
return 0;
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,354 | static TT_F26Dot6 Read_CVT( EXEC_OPS Int index )
{
return CUR.cvt[index];
}
| DoS | 0 | static TT_F26Dot6 Read_CVT( EXEC_OPS Int index )
{
return CUR.cvt[index];
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,355 | static TT_F26Dot6 Read_CVT_Stretched( EXEC_OPS Int index )
{
return MulDiv_Round( CUR.cvt[index], CURRENT_Ratio(), 0x10000 );
}
| DoS | 0 | static TT_F26Dot6 Read_CVT_Stretched( EXEC_OPS Int index )
{
return MulDiv_Round( CUR.cvt[index], CURRENT_Ratio(), 0x10000 );
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,356 | static TT_F26Dot6 Round_Down_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation) & (-64);
if ( val < 0 )
val = 0;
}
else... | DoS | 0 | static TT_F26Dot6 Round_Down_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation) & (-64);
if ( val < 0 )
val = 0;
}
else... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,357 | static TT_F26Dot6 Round_None( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = distance + compensation;
if ( val < 0 )
val = 0;
}
else {
val = distance - ... | DoS | 0 | static TT_F26Dot6 Round_None( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = distance + compensation;
if ( val < 0 )
val = 0;
}
else {
val = distance - ... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,358 | static TT_F26Dot6 Round_Super( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
if ( distance >= 0 )
{
val = (distance - CUR.phase + CUR.threshold + compensation) &
(-CUR.period);
if ( val < 0 )
va... | DoS | 0 | static TT_F26Dot6 Round_Super( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
if ( distance >= 0 )
{
val = (distance - CUR.phase + CUR.threshold + compensation) &
(-CUR.period);
if ( val < 0 )
va... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,359 | static TT_F26Dot6 Round_Super_45( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
if ( distance >= 0 )
{
val = ( (distance - CUR.phase + CUR.threshold + compensation) /
CUR.period ) * CUR.period;
if ... | DoS | 0 | static TT_F26Dot6 Round_Super_45( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
if ( distance >= 0 )
{
val = ( (distance - CUR.phase + CUR.threshold + compensation) /
CUR.period ) * CUR.period;
if ... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,360 | static TT_F26Dot6 Round_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 32) & (-64);
if ( val < 0 )
val = 0;
}
else
... | DoS | 0 | static TT_F26Dot6 Round_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 32) & (-64);
if ( val < 0 )
val = 0;
}
else
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,361 | static TT_F26Dot6 Round_Up_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 63) & (-64);
if ( val < 0 )
val = 0;
}
els... | DoS | 0 | static TT_F26Dot6 Round_Up_To_Grid( EXEC_OPS TT_F26Dot6 distance,
TT_F26Dot6 compensation )
{
TT_F26Dot6 val;
(void)exc;
if ( distance >= 0 )
{
val = (distance + compensation + 63) & (-64);
if ( val < 0 )
val = 0;
}
els... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,362 | static void Shift( Int p1,
Int p2,
Int p,
struct LOC_Ins_IUP* LINK )
{
Int i;
TT_F26Dot6 x;
x = LINK->curs[p] - LINK->orgs[p];
for ( i = p1; i < p; i++ )
LINK->curs[i] += x;
for ( i = p + 1; i <= p2; i++ )
... | DoS | 0 | static void Shift( Int p1,
Int p2,
Int p,
struct LOC_Ins_IUP* LINK )
{
Int i;
TT_F26Dot6 x;
x = LINK->curs[p] - LINK->orgs[p];
for ( i = p1; i < p; i++ )
LINK->curs[i] += x;
for ( i = p + 1; i <= p2; i++ )
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,363 | static void Write_CVT( EXEC_OPS Int index, TT_F26Dot6 value )
{
int ov=CUR.cvt[index];
(void)ov; /* Quiet compiler warning in release build. */
CUR.cvt[index] = value;
DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
}
| DoS | 0 | static void Write_CVT( EXEC_OPS Int index, TT_F26Dot6 value )
{
int ov=CUR.cvt[index];
(void)ov; /* Quiet compiler warning in release build. */
CUR.cvt[index] = value;
DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
}
| @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,364 | static void skip_FDEF( EXEC_OP )
{
/* 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 */
... | DoS | 0 | static void skip_FDEF( EXEC_OP )
{
/* 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 */
... | @@ -1794,6 +1794,12 @@ static int nInstrCount=0;
static void Ins_JMPR( INS_ARG )
{
+ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) )
+ {
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE; | CWE-125 | null | null |
4,365 | static int DebugPrint(ttfFont *ttf, const char *fmt, ...)
{
char buf[500];
va_list args;
int count;
if (gs_debug_c('Y')) {
va_start(args, fmt);
count = vsnprintf(buf, sizeof(buf), fmt, args);
/* NB: moved debug output from stdout to stderr
*/
errwrite(ttf->Debug... | DoS | 0 | static int DebugPrint(ttfFont *ttf, const char *fmt, ...)
{
char buf[500];
va_list args;
int count;
if (gs_debug_c('Y')) {
va_start(args, fmt);
count = vsnprintf(buf, sizeof(buf), fmt, args);
/* NB: moved debug output from stdout to stderr
*/
errwrite(ttf->Debug... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,366 | static void DebugRepaint(ttfFont *ttf)
{
}
| DoS | 0 | static void DebugRepaint(ttfFont *ttf)
{
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,367 | ENUM_PTRS_WITH(gx_ttfReader_enum_ptrs, gx_ttfReader *mptr)
{
/* The fields 'pfont' and 'glyph_data' may contain pointers from global
to local memory ( see a comment in gxttfb.h).
They must be NULL when a garbager is invoked.
Due to that we don't enumerate and don't relocate ... | DoS | 0 | ENUM_PTRS_WITH(gx_ttfReader_enum_ptrs, gx_ttfReader *mptr)
{
/* The fields 'pfont' and 'glyph_data' may contain pointers from global
to local memory ( see a comment in gxttfb.h).
They must be NULL when a garbager is invoked.
Due to that we don't enumerate and don't relocate ... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,368 | static void WarnBadInstruction(gs_font_type42 *pfont, int glyph_index)
{
char buf[gs_font_name_max + 1];
int l;
gs_font_type42 *base_font = pfont;
while ((gs_font_type42 *)base_font->base != base_font)
base_font = (gs_font_type42 *)base_font->base;
if (!base_font->data.warning_bad_instructi... | DoS | 0 | static void WarnBadInstruction(gs_font_type42 *pfont, int glyph_index)
{
char buf[gs_font_name_max + 1];
int l;
gs_font_type42 *base_font = pfont;
while ((gs_font_type42 *)base_font->base != base_font)
base_font = (gs_font_type42 *)base_font->base;
if (!base_font->data.warning_bad_instructi... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,369 | static void WarnPatented(gs_font_type42 *pfont, ttfFont *ttf, const char *txt)
{
if (!ttf->design_grid) {
char buf[gs_font_name_max + 1];
int l;
gs_font_type42 *base_font = pfont;
while ((gs_font_type42 *)base_font->base != base_font)
base_font = (gs_font_type42 *)base_f... | DoS | 0 | static void WarnPatented(gs_font_type42 *pfont, ttfFont *ttf, const char *txt)
{
if (!ttf->design_grid) {
char buf[gs_font_name_max + 1];
int l;
gs_font_type42 *base_font = pfont;
while ((gs_font_type42 *)base_font->base != base_font)
base_font = (gs_font_type42 *)base_f... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,370 | static void decompose_matrix(const gs_font_type42 *pfont, const gs_matrix * char_tm,
const gs_log2_scale_point *log2_scale, bool design_grid,
gs_point *char_size, gs_point *subpix_origin, gs_matrix *post_transform, bool *dg)
{
/*
* char_tm maps to subpixels.
*/
/*
* We use a Free Type 1 T... | DoS | 0 | static void decompose_matrix(const gs_font_type42 *pfont, const gs_matrix * char_tm,
const gs_log2_scale_point *log2_scale, bool design_grid,
gs_point *char_size, gs_point *subpix_origin, gs_matrix *post_transform, bool *dg)
{
/*
* char_tm maps to subpixels.
*/
/*
* We use a Free Type 1 T... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,371 | static int grid_fit(gx_device_spot_analyzer *padev, gx_path *path,
gs_font_type42 *pfont, const gs_log2_scale_point *pscale, gx_ttfExport *e, ttfOutliner *o)
{
/* Not completed yet. */
gs_gstate gs_stub;
gx_fill_params params;
gx_device_color devc_stub;
int code;
t1_hinter_aux h;
gs_... | DoS | 0 | static int grid_fit(gx_device_spot_analyzer *padev, gx_path *path,
gs_font_type42 *pfont, const gs_log2_scale_point *pscale, gx_ttfExport *e, ttfOutliner *o)
{
/* Not completed yet. */
gs_gstate gs_stub;
gx_fill_params params;
gx_device_color devc_stub;
int code;
t1_hinter_aux h;
gs_... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,372 | static void gx_ttfExport__Close(ttfExport *self)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_close_subpath_notes(e->path, sn_none);
}
| DoS | 0 | static void gx_ttfExport__Close(ttfExport *self)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_close_subpath_notes(e->path, sn_none);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,373 | static void gx_ttfExport__DebugPaint(ttfExport *self)
{
}
| DoS | 0 | static void gx_ttfExport__DebugPaint(ttfExport *self)
{
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,374 | static void gx_ttfExport__LineTo(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_add_line_notes(e->path, float2fixed(p->x), float2fixed(p->y), sn_none);
}
| DoS | 0 | static void gx_ttfExport__LineTo(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_add_line_notes(e->path, float2fixed(p->x), float2fixed(p->y), sn_none);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,375 | static void gx_ttfExport__MoveTo(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_add_point(e->path, float2fixed(p->x), float2fixed(p->y));
}
| DoS | 0 | static void gx_ttfExport__MoveTo(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
if (!e->error)
e->error = gx_path_add_point(e->path, float2fixed(p->x), float2fixed(p->y));
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,376 | static void gx_ttfExport__Point(ttfExport *self, FloatPoint *p, bool bOnCurve, bool bNewPath)
{
/* Never called. */
}
| DoS | 0 | static void gx_ttfExport__Point(ttfExport *self, FloatPoint *p, bool bOnCurve, bool bNewPath)
{
/* Never called. */
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,377 | static void gx_ttfExport__SetWidth(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
e->w.x = float2fixed(p->x);
e->w.y = float2fixed(p->y);
}
| DoS | 0 | static void gx_ttfExport__SetWidth(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
e->w.x = float2fixed(p->x);
e->w.y = float2fixed(p->y);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,378 | static void *gx_ttfMemory__alloc_bytes(ttfMemory *self, int size, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
return gs_alloc_bytes(mem, size, cname);
}
| DoS | 0 | static void *gx_ttfMemory__alloc_bytes(ttfMemory *self, int size, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
return gs_alloc_bytes(mem, size, cname);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,379 | static void *gx_ttfMemory__alloc_struct(ttfMemory *self, const ttfMemoryDescriptor *d, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
return mem->procs.alloc_struct(mem, (const gs_memory_struct_type_t *)d, cname);
}
| DoS | 0 | static void *gx_ttfMemory__alloc_struct(ttfMemory *self, const ttfMemoryDescriptor *d, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
return mem->procs.alloc_struct(mem, (const gs_memory_struct_type_t *)d, cname);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,380 | static void gx_ttfMemory__free(ttfMemory *self, void *p, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
gs_free_object(mem, p, cname);
}
| DoS | 0 | static void gx_ttfMemory__free(ttfMemory *self, void *p, const char *cname)
{
gs_memory_t *mem = ((gx_ttfMemory *)self)->memory;
gs_free_object(mem, p, cname);
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,381 | static bool gx_ttfReader__Eof(ttfReader *self)
{
gx_ttfReader *r = (gx_ttfReader *)self;
if (r->extra_glyph_index != -1)
return r->pos >= r->glyph_data.bits.size;
/* We can't know whether pfont->data.string_proc has more bytes,
so we never report Eof for it. */
return false;
}
| DoS | 0 | static bool gx_ttfReader__Eof(ttfReader *self)
{
gx_ttfReader *r = (gx_ttfReader *)self;
if (r->extra_glyph_index != -1)
return r->pos >= r->glyph_data.bits.size;
/* We can't know whether pfont->data.string_proc has more bytes,
so we never report Eof for it. */
return false;
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,382 | static int gx_ttfReader__LoadGlyph(ttfReader *self, int glyph_index, const byte **p, int *size)
{
gx_ttfReader *r = (gx_ttfReader *)self;
gs_font_type42 *pfont = r->pfont;
int code;
if (r->extra_glyph_index != -1)
return 0; /* We only maintain a single glyph buffer.
It's en... | DoS | 0 | static int gx_ttfReader__LoadGlyph(ttfReader *self, int glyph_index, const byte **p, int *size)
{
gx_ttfReader *r = (gx_ttfReader *)self;
gs_font_type42 *pfont = r->pfont;
int code;
if (r->extra_glyph_index != -1)
return 0; /* We only maintain a single glyph buffer.
It's en... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,383 | static void gx_ttfReader__ReleaseGlyph(ttfReader *self, int glyph_index)
{
gx_ttfReader *r = (gx_ttfReader *)self;
if (r->extra_glyph_index != glyph_index)
return;
r->extra_glyph_index = -1;
gs_glyph_data_free(&r->glyph_data, "gx_ttfReader__ReleaseExtraGlyph");
}
| DoS | 0 | static void gx_ttfReader__ReleaseGlyph(ttfReader *self, int glyph_index)
{
gx_ttfReader *r = (gx_ttfReader *)self;
if (r->extra_glyph_index != glyph_index)
return;
r->extra_glyph_index = -1;
gs_glyph_data_free(&r->glyph_data, "gx_ttfReader__ReleaseExtraGlyph");
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,384 | static void gx_ttfReader__Reset(gx_ttfReader *self)
{
if (self->extra_glyph_index != -1) {
self->extra_glyph_index = -1;
gs_glyph_data_free(&self->glyph_data, "gx_ttfReader__Reset");
}
self->error = false;
self->pos = 0;
}
| DoS | 0 | static void gx_ttfReader__Reset(gx_ttfReader *self)
{
if (self->extra_glyph_index != -1) {
self->extra_glyph_index = -1;
gs_glyph_data_free(&self->glyph_data, "gx_ttfReader__Reset");
}
self->error = false;
self->pos = 0;
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,385 | static void gx_ttfReader__Seek(ttfReader *self, int nPos)
{
gx_ttfReader *r = (gx_ttfReader *)self;
r->pos = nPos;
}
| DoS | 0 | static void gx_ttfReader__Seek(ttfReader *self, int nPos)
{
gx_ttfReader *r = (gx_ttfReader *)self;
r->pos = nPos;
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,386 | static int gx_ttfReader__Tell(ttfReader *self)
{
gx_ttfReader *r = (gx_ttfReader *)self;
return r->pos;
}
| DoS | 0 | static int gx_ttfReader__Tell(ttfReader *self)
{
gx_ttfReader *r = (gx_ttfReader *)self;
return r->pos;
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,387 | gx_ttfReader *gx_ttfReader__create(gs_memory_t *mem)
{
gx_ttfReader *r = gs_alloc_struct(mem, gx_ttfReader, &st_gx_ttfReader, "gx_ttfReader__create");
if (r != NULL) {
r->super.Eof = gx_ttfReader__Eof;
r->super.Read = gx_ttfReader__Read;
r->super.Seek = gx_ttfReader__Seek;
r->su... | DoS | 0 | gx_ttfReader *gx_ttfReader__create(gs_memory_t *mem)
{
gx_ttfReader *r = gs_alloc_struct(mem, gx_ttfReader, &st_gx_ttfReader, "gx_ttfReader__create");
if (r != NULL) {
r->super.Eof = gx_ttfReader__Eof;
r->super.Read = gx_ttfReader__Read;
r->super.Seek = gx_ttfReader__Seek;
r->su... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,388 | gx_ttfReader__default_get_metrics(const ttfReader *ttf, uint glyph_index, bool bVertical,
short *sideBearing, unsigned short *nAdvance)
{
gx_ttfReader *self = (gx_ttfReader *)ttf;
float sbw[4];
int sbw_offset = bVertical;
int code;
int factor = self->pfont->data.uni... | DoS | 0 | gx_ttfReader__default_get_metrics(const ttfReader *ttf, uint glyph_index, bool bVertical,
short *sideBearing, unsigned short *nAdvance)
{
gx_ttfReader *self = (gx_ttfReader *)ttf;
float sbw[4];
int sbw_offset = bVertical;
int code;
int factor = self->pfont->data.uni... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,389 | void gx_ttfReader__destroy(gx_ttfReader *self)
{
gs_free_object(self->memory, self, "gx_ttfReader__destroy");
}
| DoS | 0 | void gx_ttfReader__destroy(gx_ttfReader *self)
{
gs_free_object(self->memory, self, "gx_ttfReader__destroy");
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,390 | int gx_ttf_outline(ttfFont *ttf, gx_ttfReader *r, gs_font_type42 *pfont, int glyph_index,
const gs_matrix *m, const gs_log2_scale_point *pscale,
gx_path *path, bool design_grid)
{
gx_ttfExport e;
ttfOutliner o;
gs_point char_size, subpix_origin;
gs_matrix post_transform;
/* Ghostscri... | DoS | 0 | int gx_ttf_outline(ttfFont *ttf, gx_ttfReader *r, gs_font_type42 *pfont, int glyph_index,
const gs_matrix *m, const gs_log2_scale_point *pscale,
gx_path *path, bool design_grid)
{
gx_ttfExport e;
ttfOutliner o;
gs_point char_size, subpix_origin;
gs_matrix post_transform;
/* Ghostscri... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,391 | static inline float reminder(float v, int x)
{
return ((v / x) - floor(v / x)) * x;
}
| DoS | 0 | static inline float reminder(float v, int x)
{
return ((v / x) - floor(v / x)) * x;
}
| @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,392 | stem_hint_handler(void *client_data, gx_san_sect *ss)
{
t1_hinter_aux *h = (t1_hinter_aux *)client_data;
if (ss->side_mask == 3) {
/* Orient horizontal hints to help with top/bottom alignment zones.
Otherwize glyphs may get a random height due to serif adjustsment. */
if (ss->xl > h-... | DoS | 0 | stem_hint_handler(void *client_data, gx_san_sect *ss)
{
t1_hinter_aux *h = (t1_hinter_aux *)client_data;
if (ss->side_mask == 3) {
/* Orient horizontal hints to help with top/bottom alignment zones.
Otherwize glyphs may get a random height due to serif adjustsment. */
if (ss->xl > h-... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,393 | transpose_path(gx_path *path)
{ segment *s = (segment *)path->first_subpath;
exch(path->bbox.p.x, path->bbox.p.y);
exch(path->bbox.q.x, path->bbox.q.y);
for (; s; s = s->next) {
if (s->type == s_curve) {
curve_segment *c = (curve_segment *)s;
exch(c->p1.x, c->p1.y);
... | DoS | 0 | transpose_path(gx_path *path)
{ segment *s = (segment *)path->first_subpath;
exch(path->bbox.p.x, path->bbox.p.y);
exch(path->bbox.q.x, path->bbox.q.y);
for (; s; s = s->next) {
if (s->type == s_curve) {
curve_segment *c = (curve_segment *)s;
exch(c->p1.x, c->p1.y);
... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,394 | int ttfFont__Open_aux(ttfFont *self, ttfInterpreter *tti, gx_ttfReader *r, gs_font_type42 *pfont,
const gs_matrix * char_tm, const gs_log2_scale_point *log2_scale,
bool design_grid)
{
gs_point char_size, subpix_origin;
gs_matrix post_transform;
/*
* Ghostscript proceses a ... | DoS | 0 | int ttfFont__Open_aux(ttfFont *self, ttfInterpreter *tti, gx_ttfReader *r, gs_font_type42 *pfont,
const gs_matrix * char_tm, const gs_log2_scale_point *log2_scale,
bool design_grid)
{
gs_point char_size, subpix_origin;
gs_matrix post_transform;
/*
* Ghostscript proceses a ... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,395 | ttfFont *ttfFont__create(gs_font_dir *dir)
{
gs_memory_t *mem = dir->memory->stable_memory;
ttfFont *ttf;
if (dir->ttm == NULL) {
gx_ttfMemory *m = gs_alloc_struct(mem, gx_ttfMemory, &st_gx_ttfMemory, "ttfFont__create(gx_ttfMemory)");
if (!m)
return 0;
m->super.alloc_st... | DoS | 0 | ttfFont *ttfFont__create(gs_font_dir *dir)
{
gs_memory_t *mem = dir->memory->stable_memory;
ttfFont *ttf;
if (dir->ttm == NULL) {
gx_ttfMemory *m = gs_alloc_struct(mem, gx_ttfMemory, &st_gx_ttfMemory, "ttfFont__create(gx_ttfMemory)");
if (!m)
return 0;
m->super.alloc_st... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,396 | void ttfFont__destroy(ttfFont *self, gs_font_dir *dir)
{
gs_memory_t *mem = dir->memory->stable_memory;
ttfFont__finit(self);
gs_free_object(mem, self, "ttfFont__destroy");
ttfInterpreter__release(&dir->tti);
gx_san__release(&dir->san);
if (dir->tti == NULL && dir->ttm != NULL) {
gs_fre... | DoS | 0 | void ttfFont__destroy(ttfFont *self, gs_font_dir *dir)
{
gs_memory_t *mem = dir->memory->stable_memory;
ttfFont__finit(self);
gs_free_object(mem, self, "ttfFont__destroy");
ttfInterpreter__release(&dir->tti);
gx_san__release(&dir->san);
if (dir->tti == NULL && dir->ttm != NULL) {
gs_fre... | @@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n)
if (!r->error) {
if (r->extra_glyph_index != -1) {
q = r->glyph_data.bits.data + r->pos;
- r->error = (r->glyph_data.bits.size - r->pos < n ?
+ r->error = ((r->pos >= r->glyph_data.bits.siz... | CWE-125 | null | null |
4,397 | static void Ins_JMPR( INS_ARG )
{
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE;
if(CUR.IP > CUR.codeSize ||
(CUR.code[CUR.IP] != 0x2D && CUR.code[CUR.IP - 1] == 0x2D))
/* The JPMR is meant to stop at the ENDF instruction to finish
* the function. However the programmer made a mi... | DoS | 0 | static void Ins_JMPR( INS_ARG )
{
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE;
if(CUR.IP > CUR.codeSize ||
(CUR.code[CUR.IP] != 0x2D && CUR.code[CUR.IP - 1] == 0x2D))
/* The JPMR is meant to stop at the ENDF instruction to finish
* the function. However the programmer made a mi... | @@ -3770,7 +3770,8 @@ static int nInstrCount=0;
point = (Int)args[0];
- if ( BOUNDS( args[0], CUR.zp1.n_points ) )
+ if ( BOUNDS( args[0], CUR.zp1.n_points ) ||
+ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points) )
{
/* Current version of FreeType silently ignores this out of bounds error
... | CWE-125 | null | null |
4,398 | dbus_g_proxy_manager_monitor_name_owner (DBusGProxyManager *manager,
const char *owner,
const char *name)
{
GSList *names;
GSList *link;
DBusGProxyNameOwnerInfo *nameinfo;
names = g_hash_table_lookup (manager->owner_names, owner);
link = g_slist_find_custom (names, name, find_nam... | +Priv | 0 | dbus_g_proxy_manager_monitor_name_owner (DBusGProxyManager *manager,
const char *owner,
const char *name)
{
GSList *names;
GSList *link;
DBusGProxyNameOwnerInfo *nameinfo;
names = g_hash_table_lookup (manager->owner_names, owner);
link = g_slist_find_custom (names, name, find_nam... | @@ -1250,8 +1250,11 @@ dbus_g_proxy_manager_filter (DBusConnection *connection,
GSList *tmp;
const char *sender;
+ sender = dbus_message_get_sender (message);
+
/* First we handle NameOwnerChanged internally */
- if (dbus_message_is_signal (message,
+ if (g_strcmp0 (sender, DBUS... | CWE-20 | null | null |
4,399 | dbus_g_proxy_manager_replace_name_owner (DBusGProxyManager *manager,
const char *name,
const char *prev_owner,
const char *new_owner)
{
GSList *names;
if (prev_owner[0] == '\0')
{
GSList *tmp;
GSList *removed;
/* We have a new service, look at un... | +Priv | 0 | dbus_g_proxy_manager_replace_name_owner (DBusGProxyManager *manager,
const char *name,
const char *prev_owner,
const char *new_owner)
{
GSList *names;
if (prev_owner[0] == '\0')
{
GSList *tmp;
GSList *removed;
/* We have a new service, look at un... | @@ -1250,8 +1250,11 @@ dbus_g_proxy_manager_filter (DBusConnection *connection,
GSList *tmp;
const char *sender;
+ sender = dbus_message_get_sender (message);
+
/* First we handle NameOwnerChanged internally */
- if (dbus_message_is_signal (message,
+ if (g_strcmp0 (sender, DBUS... | CWE-20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.