idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
8,200 | ft_lookup_glyph_renderer( FT_GlyphSlot slot )
{
FT_Face face = slot->face;
FT_Library library = FT_FACE_LIBRARY( face );
FT_Renderer result = library->cur_renderer;
if ( !result || result->glyph_format != slot->format )
result = FT_Lookup_Renderer( library, slot->format, 0 );
... | DoS Exec Code Overflow | 0 | ft_lookup_glyph_renderer( FT_GlyphSlot slot )
{
FT_Face face = slot->face;
FT_Library library = FT_FACE_LIBRARY( face );
FT_Renderer result = library->cur_renderer;
if ( !result || result->glyph_format != slot->format )
result = FT_Lookup_Renderer( library, slot->format, 0 );
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,201 | ft_recompute_scaled_metrics( FT_Face face,
FT_Size_Metrics* metrics )
{
/* Compute root ascender, descender, test height, and max_advance */
#ifdef GRID_FIT_METRICS
metrics->ascender = FT_PIX_CEIL( FT_MulFix( face->ascender,
... | DoS Exec Code Overflow | 0 | ft_recompute_scaled_metrics( FT_Face face,
FT_Size_Metrics* metrics )
{
/* Compute root ascender, descender, test height, and max_advance */
#ifdef GRID_FIT_METRICS
metrics->ascender = FT_PIX_CEIL( FT_MulFix( face->ascender,
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,202 | ft_set_current_renderer( FT_Library library )
{
FT_Renderer renderer;
renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );
library->cur_renderer = renderer;
}
| DoS Exec Code Overflow | 0 | ft_set_current_renderer( FT_Library library )
{
FT_Renderer renderer;
renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );
library->cur_renderer = renderer;
}
| @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,203 | ft_stub_set_char_sizes( FT_Size size,
FT_F26Dot6 width,
FT_F26Dot6 height,
FT_UInt horz_res,
FT_UInt vert_res )
{
FT_Size_RequestRec req;
FT_Driver driver = size->face->driver;
... | DoS Exec Code Overflow | 0 | ft_stub_set_char_sizes( FT_Size size,
FT_F26Dot6 width,
FT_F26Dot6 height,
FT_UInt horz_res,
FT_UInt vert_res )
{
FT_Size_RequestRec req;
FT_Driver driver = size->face->driver;
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,204 | ft_stub_set_pixel_sizes( FT_Size size,
FT_UInt width,
FT_UInt height )
{
FT_Size_RequestRec req;
FT_Driver driver = size->face->driver;
if ( driver->clazz->request_size )
{
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
... | DoS Exec Code Overflow | 0 | ft_stub_set_pixel_sizes( FT_Size size,
FT_UInt width,
FT_UInt height )
{
FT_Size_RequestRec req;
FT_Driver driver = size->face->driver;
if ( driver->clazz->request_size )
{
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,205 | ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
FT_Pos advance )
{
FT_Pos height = metrics->height;
/* compensate for glyph with bbox above/below the baseline */
if ( metrics->horiBearingY < 0 )
{
if ( height < metrics->horiBearingY ... | DoS Exec Code Overflow | 0 | ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
FT_Pos advance )
{
FT_Pos height = metrics->height;
/* compensate for glyph with bbox above/below the baseline */
if ( metrics->horiBearingY < 0 )
{
if ( height < metrics->horiBearingY ... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,206 | load_face_in_embedded_rfork( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Face *aface,
const FT_Open_Args *args )
{
#undef FT_C... | DoS Exec Code Overflow | 0 | load_face_in_embedded_rfork( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Face *aface,
const FT_Open_Args *args )
{
#undef FT_C... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,207 | load_mac_face( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Face *aface,
const FT_Open_Args *args )
{
FT_Error error;
FT_UNUSED( args );
error = IsMacBinary( library, stre... | DoS Exec Code Overflow | 0 | load_mac_face( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Face *aface,
const FT_Open_Args *args )
{
FT_Error error;
FT_UNUSED( args );
error = IsMacBinary( library, stre... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,208 | memory_stream_close( FT_Stream stream )
{
FT_Memory memory = stream->memory;
FT_FREE( stream->base );
stream->size = 0;
stream->base = 0;
stream->close = 0;
}
| DoS Exec Code Overflow | 0 | memory_stream_close( FT_Stream stream )
{
FT_Memory memory = stream->memory;
FT_FREE( stream->base );
stream->size = 0;
stream->base = 0;
stream->close = 0;
}
| @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,209 | new_memory_stream( FT_Library library,
FT_Byte* base,
FT_ULong size,
FT_Stream_CloseFunc close,
FT_Stream *astream )
{
FT_Error error;
FT_Memory memory;
FT_Stream stream;
... | DoS Exec Code Overflow | 0 | new_memory_stream( FT_Library library,
FT_Byte* base,
FT_ULong size,
FT_Stream_CloseFunc close,
FT_Stream *astream )
{
FT_Error error;
FT_Memory memory;
FT_Stream stream;
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,210 | open_face_PS_from_sfnt_stream( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Int num_params,
FT_Parameter *params,
... | DoS Exec Code Overflow | 0 | open_face_PS_from_sfnt_stream( FT_Library library,
FT_Stream stream,
FT_Long face_index,
FT_Int num_params,
FT_Parameter *params,
... | @@ -1550,6 +1550,9 @@
FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
i, offsets[i], rlen, flags ));
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
/* the flags are part of the resource, so rlen >= 2. *... | CWE-119 | null | null |
8,211 | gray_compute_cbox( RAS_ARG )
{
FT_Outline* outline = &ras.outline;
FT_Vector* vec = outline->points;
FT_Vector* limit = vec + outline->n_points;
if ( outline->n_points <= 0 )
{
ras.min_ex = ras.max_ex = 0;
ras.min_ey = ras.max_ey = 0;
return;
}
ras.min_ex ... | DoS Exec Code Overflow | 0 | gray_compute_cbox( RAS_ARG )
{
FT_Outline* outline = &ras.outline;
FT_Vector* vec = outline->points;
FT_Vector* limit = vec + outline->n_points;
if ( outline->n_points <= 0 )
{
ras.min_ex = ras.max_ex = 0;
ras.min_ey = ras.max_ey = 0;
return;
}
ras.min_ex ... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,212 | gray_conic_to( const FT_Vector* control,
const FT_Vector* to,
PWorker worker )
{
gray_render_conic( RAS_VAR_ control, to );
return 0;
}
| DoS Exec Code Overflow | 0 | gray_conic_to( const FT_Vector* control,
const FT_Vector* to,
PWorker worker )
{
gray_render_conic( RAS_VAR_ control, to );
return 0;
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,213 | gray_convert_glyph( RAS_ARG )
{
TBand bands[40];
TBand* volatile band;
int volatile n, num_bands;
TPos volatile min, max, max_y;
FT_BBox* clip;
/* Set up state in the raster object */
gray_compute_cbox( RAS_VAR );
/* clip to target bitmap, exit if nothin... | DoS Exec Code Overflow | 0 | gray_convert_glyph( RAS_ARG )
{
TBand bands[40];
TBand* volatile band;
int volatile n, num_bands;
TPos volatile min, max, max_y;
FT_BBox* clip;
/* Set up state in the raster object */
gray_compute_cbox( RAS_VAR );
/* clip to target bitmap, exit if nothin... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,214 | gray_convert_glyph_inner( RAS_ARG )
{
volatile int error = 0;
#ifdef FT_CONFIG_OPTION_PIC
FT_Outline_Funcs func_interface;
Init_Class_func_interface(&func_interface);
#endif
if ( ft_setjmp( ras.jump_buffer ) == 0 )
{
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras... | DoS Exec Code Overflow | 0 | gray_convert_glyph_inner( RAS_ARG )
{
volatile int error = 0;
#ifdef FT_CONFIG_OPTION_PIC
FT_Outline_Funcs func_interface;
Init_Class_func_interface(&func_interface);
#endif
if ( ft_setjmp( ras.jump_buffer ) == 0 )
{
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,215 | gray_cubic_to( const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to,
PWorker worker )
{
gray_render_cubic( RAS_VAR_ control1, control2, to );
return 0;
}
| DoS Exec Code Overflow | 0 | gray_cubic_to( const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to,
PWorker worker )
{
gray_render_cubic( RAS_VAR_ control1, control2, to );
return 0;
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,216 | gray_dump_cells( RAS_ARG )
{
int yindex;
for ( yindex = 0; yindex < ras.ycount; yindex++ )
{
PCell cell;
printf( "%3d:", yindex );
for ( cell = ras.ycells[yindex]; cell != NULL; cell = cell->next )
printf( " (%3ld, c:%4ld, a:%6d)", cell->x, cell->cover, cell->area );
... | DoS Exec Code Overflow | 0 | gray_dump_cells( RAS_ARG )
{
int yindex;
for ( yindex = 0; yindex < ras.ycount; yindex++ )
{
PCell cell;
printf( "%3d:", yindex );
for ( cell = ras.ycells[yindex]; cell != NULL; cell = cell->next )
printf( " (%3ld, c:%4ld, a:%6d)", cell->x, cell->cover, cell->area );
... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,217 | gray_find_cell( RAS_ARG )
{
PCell *pcell, cell;
TPos x = ras.ex;
if ( x > ras.count_ex )
x = ras.count_ex;
pcell = &ras.ycells[ras.ey];
for (;;)
{
cell = *pcell;
if ( cell == NULL || cell->x > x )
break;
if ( cell->x == x )
goto Exit;
pc... | DoS Exec Code Overflow | 0 | gray_find_cell( RAS_ARG )
{
PCell *pcell, cell;
TPos x = ras.ex;
if ( x > ras.count_ex )
x = ras.count_ex;
pcell = &ras.ycells[ras.ey];
for (;;)
{
cell = *pcell;
if ( cell == NULL || cell->x > x )
break;
if ( cell->x == x )
goto Exit;
pc... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,218 | gray_hline( RAS_ARG_ TCoord x,
TCoord y,
TPos area,
TCoord acount )
{
FT_Span* span;
int count;
int coverage;
/* compute the coverage line's coverage, depending on the */
/* outline fill rule ... | DoS Exec Code Overflow | 0 | gray_hline( RAS_ARG_ TCoord x,
TCoord y,
TPos area,
TCoord acount )
{
FT_Span* span;
int count;
int coverage;
/* compute the coverage line's coverage, depending on the */
/* outline fill rule ... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,219 | gray_init_cells( RAS_ARG_ void* buffer,
long byte_size )
{
ras.buffer = buffer;
ras.buffer_size = byte_size;
ras.ycells = (PCell*) buffer;
ras.cells = NULL;
ras.max_cells = 0;
ras.num_cells = 0;
ras.area = 0;
ras.cover ... | DoS Exec Code Overflow | 0 | gray_init_cells( RAS_ARG_ void* buffer,
long byte_size )
{
ras.buffer = buffer;
ras.buffer_size = byte_size;
ras.ycells = (PCell*) buffer;
ras.cells = NULL;
ras.max_cells = 0;
ras.num_cells = 0;
ras.area = 0;
ras.cover ... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,220 | gray_line_to( const FT_Vector* to,
PWorker worker )
{
gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );
return 0;
}
| DoS Exec Code Overflow | 0 | gray_line_to( const FT_Vector* to,
PWorker worker )
{
gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );
return 0;
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,221 | gray_raster_done( FT_Raster raster )
{
/* nothing */
FT_UNUSED( raster );
}
| DoS Exec Code Overflow | 0 | gray_raster_done( FT_Raster raster )
{
/* nothing */
FT_UNUSED( raster );
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,222 | gray_raster_done( FT_Raster raster )
{
FT_Memory memory = (FT_Memory)((PRaster)raster)->memory;
FT_FREE( raster );
}
| DoS Exec Code Overflow | 0 | gray_raster_done( FT_Raster raster )
{
FT_Memory memory = (FT_Memory)((PRaster)raster)->memory;
FT_FREE( raster );
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,223 | gray_raster_new( void* memory,
FT_Raster* araster )
{
static TRaster the_raster;
FT_UNUSED( memory );
*araster = (FT_Raster)&the_raster;
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
return 0;
}
| DoS Exec Code Overflow | 0 | gray_raster_new( void* memory,
FT_Raster* araster )
{
static TRaster the_raster;
FT_UNUSED( memory );
*araster = (FT_Raster)&the_raster;
FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
return 0;
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,224 | gray_raster_new( FT_Memory memory,
FT_Raster* araster )
{
FT_Error error;
PRaster raster;
*araster = 0;
if ( !FT_ALLOC( raster, sizeof ( TRaster ) ) )
{
raster->memory = memory;
*araster = (FT_Raster)raster;
}
return error;
}
| DoS Exec Code Overflow | 0 | gray_raster_new( FT_Memory memory,
FT_Raster* araster )
{
FT_Error error;
PRaster raster;
*araster = 0;
if ( !FT_ALLOC( raster, sizeof ( TRaster ) ) )
{
raster->memory = memory;
*araster = (FT_Raster)raster;
}
return error;
}
| @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,225 | gray_raster_render( PRaster raster,
const FT_Raster_Params* params )
{
const FT_Outline* outline = (const FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;
PWorker worker;
if ( !raster || !raster->buffer || !raster->b... | DoS Exec Code Overflow | 0 | gray_raster_render( PRaster raster,
const FT_Raster_Params* params )
{
const FT_Outline* outline = (const FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;
PWorker worker;
if ( !raster || !raster->buffer || !raster->b... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,226 | gray_render_conic( RAS_ARG_ const FT_Vector* control,
const FT_Vector* to )
{
TPos dx, dy;
int top, level;
int* levels;
FT_Vector* arc;
dx = DOWNSCALE( ras.x ) + to->x - ( control->x << 1 );
if ( dx < 0 )
dx = -dx;
dy = DOWNS... | DoS Exec Code Overflow | 0 | gray_render_conic( RAS_ARG_ const FT_Vector* control,
const FT_Vector* to )
{
TPos dx, dy;
int top, level;
int* levels;
FT_Vector* arc;
dx = DOWNSCALE( ras.x ) + to->x - ( control->x << 1 );
if ( dx < 0 )
dx = -dx;
dy = DOWNS... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,227 | gray_render_cubic( RAS_ARG_ const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to )
{
int top, level;
int* levels;
FT_Vector* arc;
int mid_x = ( DOWNSCALE( ras.x ) + to->x +
... | DoS Exec Code Overflow | 0 | gray_render_cubic( RAS_ARG_ const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to )
{
int top, level;
int* levels;
FT_Vector* arc;
int mid_x = ( DOWNSCALE( ras.x ) + to->x +
... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,228 | gray_render_line( RAS_ARG_ TPos to_x,
TPos to_y )
{
TCoord ey1, ey2, fy1, fy2, mod;
TPos dx, dy, x, x2;
long p, first;
int delta, rem, lift, incr;
ey1 = TRUNC( ras.last_ey );
ey2 = TRUNC( to_y ); /* if (ey2 >= ras.max_ey) ey2 = ras.max_ey-1; */... | DoS Exec Code Overflow | 0 | gray_render_line( RAS_ARG_ TPos to_x,
TPos to_y )
{
TCoord ey1, ey2, fy1, fy2, mod;
TPos dx, dy, x, x2;
long p, first;
int delta, rem, lift, incr;
ey1 = TRUNC( ras.last_ey );
ey2 = TRUNC( to_y ); /* if (ey2 >= ras.max_ey) ey2 = ras.max_ey-1; */... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,229 | gray_set_cell( RAS_ARG_ TCoord ex,
TCoord ey )
{
/* Move the cell pointer to a new position. We set the `invalid' */
/* flag to indicate that the cell isn't part of those we're interested */
/* in during the render phase. This means that: */
/... | DoS Exec Code Overflow | 0 | gray_set_cell( RAS_ARG_ TCoord ex,
TCoord ey )
{
/* Move the cell pointer to a new position. We set the `invalid' */
/* flag to indicate that the cell isn't part of those we're interested */
/* in during the render phase. This means that: */
/... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,230 | gray_split_conic( FT_Vector* base )
{
TPos a, b;
base[4].x = base[2].x;
b = base[1].x;
a = base[3].x = ( base[2].x + b ) / 2;
b = base[1].x = ( base[0].x + b ) / 2;
base[2].x = ( a + b ) / 2;
base[4].y = base[2].y;
b = base[1].y;
a = base[3].y = ( base[2].y + b ) / 2;
b ... | DoS Exec Code Overflow | 0 | gray_split_conic( FT_Vector* base )
{
TPos a, b;
base[4].x = base[2].x;
b = base[1].x;
a = base[3].x = ( base[2].x + b ) / 2;
b = base[1].x = ( base[0].x + b ) / 2;
base[2].x = ( a + b ) / 2;
base[4].y = base[2].y;
b = base[1].y;
a = base[3].y = ( base[2].y + b ) / 2;
b ... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,231 | gray_split_cubic( FT_Vector* base )
{
TPos a, b, c, d;
base[6].x = base[3].x;
c = base[1].x;
d = base[2].x;
base[1].x = a = ( base[0].x + c ) / 2;
base[5].x = b = ( base[3].x + d ) / 2;
c = ( c + d ) / 2;
base[2].x = a = ( a + c ) / 2;
base[4].x = b = ( b + c ) / 2;
base[... | DoS Exec Code Overflow | 0 | gray_split_cubic( FT_Vector* base )
{
TPos a, b, c, d;
base[6].x = base[3].x;
c = base[1].x;
d = base[2].x;
base[1].x = a = ( base[0].x + c ) / 2;
base[5].x = b = ( base[3].x + d ) / 2;
c = ( c + d ) / 2;
base[2].x = a = ( a + c ) / 2;
base[4].x = b = ( b + c ) / 2;
base[... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,232 | gray_start_cell( RAS_ARG_ TCoord ex,
TCoord ey )
{
if ( ex > ras.max_ex )
ex = (TCoord)( ras.max_ex );
if ( ex < ras.min_ex )
ex = (TCoord)( ras.min_ex - 1 );
ras.area = 0;
ras.cover = 0;
ras.ex = ex - ras.min_ex;
ras.ey = ey - ras.m... | DoS Exec Code Overflow | 0 | gray_start_cell( RAS_ARG_ TCoord ex,
TCoord ey )
{
if ( ex > ras.max_ex )
ex = (TCoord)( ras.max_ex );
if ( ex < ras.min_ex )
ex = (TCoord)( ras.min_ex - 1 );
ras.area = 0;
ras.cover = 0;
ras.ex = ex - ras.min_ex;
ras.ey = ey - ras.m... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,233 | gray_sweep( RAS_ARG_ const FT_Bitmap* target )
{
int yindex;
FT_UNUSED( target );
if ( ras.num_cells == 0 )
return;
ras.num_gray_spans = 0;
FT_TRACE7(( "gray_sweep: start\n" ));
for ( yindex = 0; yindex < ras.ycount; yindex++ )
{
PCell cell = ras.ycells[yindex];
... | DoS Exec Code Overflow | 0 | gray_sweep( RAS_ARG_ const FT_Bitmap* target )
{
int yindex;
FT_UNUSED( target );
if ( ras.num_cells == 0 )
return;
ras.num_gray_spans = 0;
FT_TRACE7(( "gray_sweep: start\n" ));
for ( yindex = 0; yindex < ras.ycount; yindex++ )
{
PCell cell = ras.ycells[yindex];
... | @@ -1186,7 +1186,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{ | CWE-189 | null | null |
8,234 | ps_hints_apply( PS_Hints ps_hints,
FT_Outline* outline,
PSH_Globals globals,
FT_Render_Mode hint_mode )
{
PSH_GlyphRec glyphrec;
PSH_Glyph glyph = &glyphrec;
FT_Error error;
#ifdef DEBUG_HINTER
FT_Memory memory;
#end... | DoS Exec Code Mem. Corr. | 0 | ps_hints_apply( PS_Hints ps_hints,
FT_Outline* outline,
PSH_Globals globals,
FT_Render_Mode hint_mode )
{
PSH_GlyphRec glyphrec;
PSH_Glyph glyph = &glyphrec;
FT_Error error;
#ifdef DEBUG_HINTER
FT_Memory memory;
#end... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,235 | ps_simple_scale( PSH_Hint_Table table,
FT_Fixed scale,
FT_Fixed delta,
FT_Int dimension )
{
PSH_Hint hint;
FT_UInt count;
for ( count = 0; count < table->max_hints; count++ )
{
hint = table->hints + count;
... | DoS Exec Code Mem. Corr. | 0 | ps_simple_scale( PSH_Hint_Table table,
FT_Fixed scale,
FT_Fixed delta,
FT_Int dimension )
{
PSH_Hint hint;
FT_UInt count;
for ( count = 0; count < table->max_hints; count++ )
{
hint = table->hints + count;
... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,236 | psh_compute_dir( FT_Pos dx,
FT_Pos dy )
{
FT_Pos ax, ay;
int result = PSH_DIR_NONE;
ax = ( dx >= 0 ) ? dx : -dx;
ay = ( dy >= 0 ) ? dy : -dy;
if ( ay * 12 < ax )
{
/* |dy| <<< |dx| means a near-horizontal segment */
result = ( dx >= 0 ) ? PSH_DIR_RIG... | DoS Exec Code Mem. Corr. | 0 | psh_compute_dir( FT_Pos dx,
FT_Pos dy )
{
FT_Pos ax, ay;
int result = PSH_DIR_NONE;
ax = ( dx >= 0 ) ? dx : -dx;
ay = ( dy >= 0 ) ? dy : -dy;
if ( ay * 12 < ax )
{
/* |dy| <<< |dx| means a near-horizontal segment */
result = ( dx >= 0 ) ? PSH_DIR_RIG... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,237 | psh_corner_is_flat( FT_Pos x_in,
FT_Pos y_in,
FT_Pos x_out,
FT_Pos y_out )
{
FT_Pos ax = x_in;
FT_Pos ay = y_in;
FT_Pos d_in, d_out, d_corner;
if ( ax < 0 )
ax = -ax;
if ( ay < 0 )
ay = -ay;
d_in = ax + a... | DoS Exec Code Mem. Corr. | 0 | psh_corner_is_flat( FT_Pos x_in,
FT_Pos y_in,
FT_Pos x_out,
FT_Pos y_out )
{
FT_Pos ax = x_in;
FT_Pos ay = y_in;
FT_Pos d_in, d_out, d_corner;
if ( ax < 0 )
ax = -ax;
if ( ay < 0 )
ay = -ay;
d_in = ax + a... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,238 | psh_corner_orientation( FT_Pos in_x,
FT_Pos in_y,
FT_Pos out_x,
FT_Pos out_y )
{
FT_Int result;
/* deal with the trivial cases quickly */
if ( in_y == 0 )
{
if ( in_x >= 0 )
result = out_y;
else
... | DoS Exec Code Mem. Corr. | 0 | psh_corner_orientation( FT_Pos in_x,
FT_Pos in_y,
FT_Pos out_x,
FT_Pos out_y )
{
FT_Int result;
/* deal with the trivial cases quickly */
if ( in_y == 0 )
{
if ( in_x >= 0 )
result = out_y;
else
... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,239 | psh_dimension_quantize_len( PSH_Dimension dim,
FT_Pos len,
FT_Bool do_snapping )
{
if ( len <= 64 )
len = 64;
else
{
FT_Pos delta = len - dim->stdw.widths[0].cur;
if ( delta < 0 )
delta = -delta;
... | DoS Exec Code Mem. Corr. | 0 | psh_dimension_quantize_len( PSH_Dimension dim,
FT_Pos len,
FT_Bool do_snapping )
{
if ( len <= 64 )
len = 64;
else
{
FT_Pos delta = len - dim->stdw.widths[0].cur;
if ( delta < 0 )
delta = -delta;
... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,240 | psh_glyph_compute_extrema( PSH_Glyph glyph )
{
FT_UInt n;
/* first of all, compute all local extrema */
for ( n = 0; n < glyph->num_contours; n++ )
{
PSH_Point first = glyph->contours[n].start;
PSH_Point point, before, after;
if ( glyph->contours[n].count == 0 )
con... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_compute_extrema( PSH_Glyph glyph )
{
FT_UInt n;
/* first of all, compute all local extrema */
for ( n = 0; n < glyph->num_contours; n++ )
{
PSH_Point first = glyph->contours[n].start;
PSH_Point point, before, after;
if ( glyph->contours[n].count == 0 )
con... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,241 | psh_glyph_compute_inflections( PSH_Glyph glyph )
{
FT_UInt n;
for ( n = 0; n < glyph->num_contours; n++ )
{
PSH_Point first, start, end, before, after;
FT_Pos in_x, in_y, out_x, out_y;
FT_Int orient_prev, orient_cur;
FT_Int finished = 0;
/* we need at lea... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_compute_inflections( PSH_Glyph glyph )
{
FT_UInt n;
for ( n = 0; n < glyph->num_contours; n++ )
{
PSH_Point first, start, end, before, after;
FT_Pos in_x, in_y, out_x, out_y;
FT_Int orient_prev, orient_cur;
FT_Int finished = 0;
/* we need at lea... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,242 | psh_glyph_done( PSH_Glyph glyph )
{
FT_Memory memory = glyph->memory;
psh_hint_table_done( &glyph->hint_tables[1], memory );
psh_hint_table_done( &glyph->hint_tables[0], memory );
FT_FREE( glyph->points );
FT_FREE( glyph->contours );
glyph->num_points = 0;
glyph->num_contours = 0... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_done( PSH_Glyph glyph )
{
FT_Memory memory = glyph->memory;
psh_hint_table_done( &glyph->hint_tables[1], memory );
psh_hint_table_done( &glyph->hint_tables[0], memory );
FT_FREE( glyph->points );
FT_FREE( glyph->contours );
glyph->num_points = 0;
glyph->num_contours = 0... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,243 | psh_glyph_find_blue_points( PSH_Blues blues,
PSH_Glyph glyph )
{
PSH_Blue_Table table;
PSH_Blue_Zone zone;
FT_UInt glyph_count = glyph->num_points;
FT_UInt blue_count;
PSH_Point point = glyph->points;
for ( ; glyph_count > 0; glyph_c... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_find_blue_points( PSH_Blues blues,
PSH_Glyph glyph )
{
PSH_Blue_Table table;
PSH_Blue_Zone zone;
FT_UInt glyph_count = glyph->num_points;
FT_UInt blue_count;
PSH_Point point = glyph->points;
for ( ; glyph_count > 0; glyph_c... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,244 | psh_glyph_init( PSH_Glyph glyph,
FT_Outline* outline,
PS_Hints ps_hints,
PSH_Globals globals )
{
FT_Error error;
FT_Memory memory;
/* clear all fields */
FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
memory = glyph->memory = globals... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_init( PSH_Glyph glyph,
FT_Outline* outline,
PS_Hints ps_hints,
PSH_Globals globals )
{
FT_Error error;
FT_Memory memory;
/* clear all fields */
FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
memory = glyph->memory = globals... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,245 | psh_glyph_interpolate_normal_points( PSH_Glyph glyph,
FT_Int dimension )
{
#if 1
/* first technique: a point is strong if it is a local extremum */
PSH_Dimension dim = &glyph->globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_interpolate_normal_points( PSH_Glyph glyph,
FT_Int dimension )
{
#if 1
/* first technique: a point is strong if it is a local extremum */
PSH_Dimension dim = &glyph->globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,246 | psh_glyph_interpolate_other_points( PSH_Glyph glyph,
FT_Int dimension )
{
PSH_Dimension dim = &glyph->globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT_Fixed delta = dim->scale_delta;
PSH_Contour cont... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_interpolate_other_points( PSH_Glyph glyph,
FT_Int dimension )
{
PSH_Dimension dim = &glyph->globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT_Fixed delta = dim->scale_delta;
PSH_Contour cont... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,247 | psh_glyph_load_points( PSH_Glyph glyph,
FT_Int dimension )
{
FT_Vector* vec = glyph->outline->points;
PSH_Point point = glyph->points;
FT_UInt count = glyph->num_points;
for ( ; count > 0; count--, point++, vec++ )
{
point->flags2 = 0;
point->... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_load_points( PSH_Glyph glyph,
FT_Int dimension )
{
FT_Vector* vec = glyph->outline->points;
PSH_Point point = glyph->points;
FT_UInt count = glyph->num_points;
for ( ; count > 0; count--, point++, vec++ )
{
point->flags2 = 0;
point->... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,248 | psh_glyph_save_points( PSH_Glyph glyph,
FT_Int dimension )
{
FT_UInt n;
PSH_Point point = glyph->points;
FT_Vector* vec = glyph->outline->points;
char* tags = glyph->outline->tags;
for ( n = 0; n < glyph->num_points; n++ )
{
if ( dimensio... | DoS Exec Code Mem. Corr. | 0 | psh_glyph_save_points( PSH_Glyph glyph,
FT_Int dimension )
{
FT_UInt n;
PSH_Point point = glyph->points;
FT_Vector* vec = glyph->outline->points;
char* tags = glyph->outline->tags;
for ( n = 0; n < glyph->num_points; n++ )
{
if ( dimensio... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,249 | psh_hint_align( PSH_Hint hint,
PSH_Globals globals,
FT_Int dimension,
PSH_Glyph glyph )
{
PSH_Dimension dim = &globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT_Fixed delta = dim->scale_delta;
if (... | DoS Exec Code Mem. Corr. | 0 | psh_hint_align( PSH_Hint hint,
PSH_Globals globals,
FT_Int dimension,
PSH_Glyph glyph )
{
PSH_Dimension dim = &globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT_Fixed delta = dim->scale_delta;
if (... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,250 | psh_hint_overlap( PSH_Hint hint1,
PSH_Hint hint2 )
{
return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
hint2->org_pos + hint2->org_len >= hint1->org_pos;
}
| DoS Exec Code Mem. Corr. | 0 | psh_hint_overlap( PSH_Hint hint1,
PSH_Hint hint2 )
{
return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
hint2->org_pos + hint2->org_len >= hint1->org_pos;
}
| @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,251 | psh_hint_snap_stem_side_delta( FT_Fixed pos,
FT_Fixed len )
{
FT_Fixed delta1 = FT_PIX_ROUND( pos ) - pos;
FT_Fixed delta2 = FT_PIX_ROUND( pos + len ) - pos - len;
if ( FT_ABS( delta1 ) <= FT_ABS( delta2 ) )
return delta1;
else
return delta2;
}
| DoS Exec Code Mem. Corr. | 0 | psh_hint_snap_stem_side_delta( FT_Fixed pos,
FT_Fixed len )
{
FT_Fixed delta1 = FT_PIX_ROUND( pos ) - pos;
FT_Fixed delta2 = FT_PIX_ROUND( pos + len ) - pos - len;
if ( FT_ABS( delta1 ) <= FT_ABS( delta2 ) )
return delta1;
else
return delta2;
}
| @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,252 | psh_hint_table_activate_mask( PSH_Hint_Table table,
PS_Mask hint_mask )
{
FT_Int mask = 0, val = 0;
FT_Byte* cursor = hint_mask->bytes;
FT_UInt idx, limit, count;
limit = hint_mask->num_bits;
count = 0;
psh_hint_table_deactivate( table );
... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_activate_mask( PSH_Hint_Table table,
PS_Mask hint_mask )
{
FT_Int mask = 0, val = 0;
FT_Byte* cursor = hint_mask->bytes;
FT_UInt idx, limit, count;
limit = hint_mask->num_bits;
count = 0;
psh_hint_table_deactivate( table );
... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,253 | psh_hint_table_align_hints( PSH_Hint_Table table,
PSH_Globals globals,
FT_Int dimension,
PSH_Glyph glyph )
{
PSH_Hint hint;
FT_UInt count;
#ifdef DEBUG_HINTER
PSH_Dimension dim ... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_align_hints( PSH_Hint_Table table,
PSH_Globals globals,
FT_Int dimension,
PSH_Glyph glyph )
{
PSH_Hint hint;
FT_UInt count;
#ifdef DEBUG_HINTER
PSH_Dimension dim ... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,254 | psh_hint_table_deactivate( PSH_Hint_Table table )
{
FT_UInt count = table->max_hints;
PSH_Hint hint = table->hints;
for ( ; count > 0; count--, hint++ )
{
psh_hint_deactivate( hint );
hint->order = -1;
}
}
| DoS Exec Code Mem. Corr. | 0 | psh_hint_table_deactivate( PSH_Hint_Table table )
{
FT_UInt count = table->max_hints;
PSH_Hint hint = table->hints;
for ( ; count > 0; count--, hint++ )
{
psh_hint_deactivate( hint );
hint->order = -1;
}
}
| @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,255 | psh_hint_table_done( PSH_Hint_Table table,
FT_Memory memory )
{
FT_FREE( table->zones );
table->num_zones = 0;
table->zone = 0;
FT_FREE( table->sort );
FT_FREE( table->hints );
table->num_hints = 0;
table->max_hints = 0;
table->sort_global = 0;... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_done( PSH_Hint_Table table,
FT_Memory memory )
{
FT_FREE( table->zones );
table->num_zones = 0;
table->zone = 0;
FT_FREE( table->sort );
FT_FREE( table->hints );
table->num_hints = 0;
table->max_hints = 0;
table->sort_global = 0;... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,256 | psh_hint_table_find_strong_points( PSH_Hint_Table table,
PSH_Point point,
FT_UInt count,
FT_Int threshold,
FT_Int major_dir )
{
PSH... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_find_strong_points( PSH_Hint_Table table,
PSH_Point point,
FT_UInt count,
FT_Int threshold,
FT_Int major_dir )
{
PSH... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,257 | psh_hint_table_init( PSH_Hint_Table table,
PS_Hint_Table hints,
PS_Mask_Table hint_masks,
PS_Mask_Table counter_masks,
FT_Memory memory )
{
FT_UInt count;
FT_Error error;
FT_UNUSED( counter_masks... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_init( PSH_Hint_Table table,
PS_Hint_Table hints,
PS_Mask_Table hint_masks,
PS_Mask_Table counter_masks,
FT_Memory memory )
{
FT_UInt count;
FT_Error error;
FT_UNUSED( counter_masks... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,258 | psh_hint_table_record_mask( PSH_Hint_Table table,
PS_Mask hint_mask )
{
FT_Int mask = 0, val = 0;
FT_Byte* cursor = hint_mask->bytes;
FT_UInt idx, limit;
limit = hint_mask->num_bits;
for ( idx = 0; idx < limit; idx++ )
{
if ( mask == 0 )
... | DoS Exec Code Mem. Corr. | 0 | psh_hint_table_record_mask( PSH_Hint_Table table,
PS_Mask hint_mask )
{
FT_Int mask = 0, val = 0;
FT_Byte* cursor = hint_mask->bytes;
FT_UInt idx, limit;
limit = hint_mask->num_bits;
for ( idx = 0; idx < limit; idx++ )
{
if ( mask == 0 )
... | @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,259 | psh_print_zone( PSH_Zone zone )
{
printf( "zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\n",
zone->scale / 65536.0,
zone->delta / 64.0,
zone->min,
zone->max );
}
| DoS Exec Code Mem. Corr. | 0 | psh_print_zone( PSH_Zone zone )
{
printf( "zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\n",
zone->scale / 65536.0,
zone->delta / 64.0,
zone->min,
zone->max );
}
| @@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009... | CWE-399 | null | null |
8,260 | cff_builder_add_contour( CFF_Builder* builder )
{
FT_Outline* outline = builder->current;
FT_Error error;
if ( !builder->load_points )
{
outline->n_contours++;
return CFF_Err_Ok;
}
error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
if ( !error )
{
... | DoS Exec Code | 0 | cff_builder_add_contour( CFF_Builder* builder )
{
FT_Outline* outline = builder->current;
FT_Error error;
if ( !builder->load_points )
{
outline->n_contours++;
return CFF_Err_Ok;
}
error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 );
if ( !error )
{
... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,261 | cff_builder_init( CFF_Builder* builder,
TT_Face face,
CFF_Size size,
CFF_GlyphSlot glyph,
FT_Bool hinting )
{
builder->path_begun = 0;
builder->load_points = 1;
builder->face = face;
builder->g... | DoS Exec Code | 0 | cff_builder_init( CFF_Builder* builder,
TT_Face face,
CFF_Size size,
CFF_GlyphSlot glyph,
FT_Bool hinting )
{
builder->path_begun = 0;
builder->load_points = 1;
builder->face = face;
builder->g... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,262 | cff_builder_start_point( CFF_Builder* builder,
FT_Pos x,
FT_Pos y )
{
FT_Error error = CFF_Err_Ok;
/* test whether we are building a new contour */
if ( !builder->path_begun )
{
builder->path_begun = 1;
error = cff_b... | DoS Exec Code | 0 | cff_builder_start_point( CFF_Builder* builder,
FT_Pos x,
FT_Pos y )
{
FT_Error error = CFF_Err_Ok;
/* test whether we are building a new contour */
if ( !builder->path_begun )
{
builder->path_begun = 1;
error = cff_b... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,263 | cff_decoder_init( CFF_Decoder* decoder,
TT_Face face,
CFF_Size size,
CFF_GlyphSlot slot,
FT_Bool hinting,
FT_Render_Mode hint_mode )
{
CFF_Font cff = (CFF_Font)face->extra.data;
... | DoS Exec Code | 0 | cff_decoder_init( CFF_Decoder* decoder,
TT_Face face,
CFF_Size size,
CFF_GlyphSlot slot,
FT_Bool hinting,
FT_Render_Mode hint_mode )
{
CFF_Font cff = (CFF_Font)face->extra.data;
... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,264 | cff_decoder_prepare( CFF_Decoder* decoder,
CFF_Size size,
FT_UInt glyph_index )
{
CFF_Builder *builder = &decoder->builder;
CFF_Font cff = (CFF_Font)builder->face->extra.data;
CFF_SubFont sub = &cff->top_font;
FT_Error er... | DoS Exec Code | 0 | cff_decoder_prepare( CFF_Decoder* decoder,
CFF_Size size,
FT_UInt glyph_index )
{
CFF_Builder *builder = &decoder->builder;
CFF_Font cff = (CFF_Font)builder->face->extra.data;
CFF_SubFont sub = &cff->top_font;
FT_Error er... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,265 | cff_get_glyph_data( TT_Face face,
FT_UInt glyph_index,
FT_Byte** pointer,
FT_ULong* length )
{
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* For incremental fonts get the character data using the */
/* callback function. ... | DoS Exec Code | 0 | cff_get_glyph_data( TT_Face face,
FT_UInt glyph_index,
FT_Byte** pointer,
FT_ULong* length )
{
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* For incremental fonts get the character data using the */
/* callback function. ... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,266 | cff_operator_seac( CFF_Decoder* decoder,
FT_Pos asb,
FT_Pos adx,
FT_Pos ady,
FT_Int bchar,
FT_Int achar )
{
FT_Error error;
CFF_Builder* builder = &decoder->buil... | DoS Exec Code | 0 | cff_operator_seac( CFF_Decoder* decoder,
FT_Pos asb,
FT_Pos adx,
FT_Pos ady,
FT_Int bchar,
FT_Int achar )
{
FT_Error error;
CFF_Builder* builder = &decoder->buil... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,267 | cff_slot_load( CFF_GlyphSlot glyph,
CFF_Size size,
FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
CFF_Decoder decoder;
TT_Face face = (TT_Face)glyph->root.face;
FT_Bool hinting, force_scaling;
CFF... | DoS Exec Code | 0 | cff_slot_load( CFF_GlyphSlot glyph,
CFF_Size size,
FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
CFF_Decoder decoder;
TT_Face face = (TT_Face)glyph->root.face;
FT_Bool hinting, force_scaling;
CFF... | @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,268 | check_points( CFF_Builder* builder,
FT_Int count )
{
return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
}
| DoS Exec Code | 0 | check_points( CFF_Builder* builder,
FT_Int count )
{
return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 );
}
| @@ -2275,6 +2275,8 @@
/* this is the implementation described for `unknown' other */
/* subroutines in the Type1 spec. */
args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_o... | CWE-189 | null | null |
8,269 | XvQueryExtension(
Display *dpy,
unsigned int *p_version,
unsigned int *p_revision,
unsigned int *p_requestBase,
unsigned int *p_eventBase,
unsigned int *p_errorBase)
{
XExtDisplayInfo *info = xv_find_display(dpy);
xvQueryExtensionReq *req;
xvQueryExtensionReply rep;
int status;
... | null | 0 | XvQueryExtension(
Display *dpy,
unsigned int *p_version,
unsigned int *p_revision,
unsigned int *p_requestBase,
unsigned int *p_eventBase,
unsigned int *p_errorBase)
{
XExtDisplayInfo *info = xv_find_display(dpy);
xvQueryExtensionReq *req;
xvQueryExtensionReply rep;
int status;
... | @@ -158,6 +158,7 @@ XvQueryAdaptors(
size_t size;
unsigned int ii, jj;
char *name;
+ char *end;
XvAdaptorInfo *pas = NULL, *pa;
XvFormat *pfs, *pf;
char *buffer = NULL;
@@ -197,17 +198,13 @@ XvQueryAdaptors(
/* GET INPUT ADAPTORS */
if (rep.num_adaptors == 0) {
- /* I... | CWE-125 | null | null |
8,270 | account_type_from_pwent (struct passwd *pwent)
{
struct group *grp;
gid_t wheel;
gid_t *groups;
gint ngroups;
gint i;
if (pwent->pw_uid == 0) {
g_debug ("user is root so account type is administrator");
return ACCOUNT_TYPE_ADMINISTRATOR;
... | null | 0 | account_type_from_pwent (struct passwd *pwent)
{
struct group *grp;
gid_t wheel;
gid_t *groups;
gint ngroups;
gint i;
if (pwent->pw_uid == 0) {
g_debug ("user is root so account type is administrator");
return ACCOUNT_TYPE_ADMINISTRATOR;
... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,271 | compute_object_path (User *user)
{
gchar *object_path;
object_path = g_strdup_printf ("/org/freedesktop/Accounts/User%ld",
(long) user->uid);
return object_path;
}
| null | 0 | compute_object_path (User *user)
{
gchar *object_path;
object_path = g_strdup_printf ("/org/freedesktop/Accounts/User%ld",
(long) user->uid);
return object_path;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,272 | move_extra_data (const gchar *old_name,
const gchar *new_name)
{
gchar *old_filename;
gchar *new_filename;
old_filename = g_build_filename ("/var/lib/AccountsService/users",
old_name, NULL);
new_filename = g_build_filename ("/var... | null | 0 | move_extra_data (const gchar *old_name,
const gchar *new_name)
{
gchar *old_filename;
gchar *new_filename;
old_filename = g_build_filename ("/var/lib/AccountsService/users",
old_name, NULL);
new_filename = g_build_filename ("/var... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,273 | save_extra_data (User *user)
{
gchar *filename;
GKeyFile *keyfile;
gchar *data;
GError *error;
keyfile = g_key_file_new ();
user_local_save_to_keyfile (user, keyfile);
error = NULL;
data = g_key_file_to_data (keyfile, NULL, &error);
if (error == ... | null | 0 | save_extra_data (User *user)
{
gchar *filename;
GKeyFile *keyfile;
gchar *data;
GError *error;
keyfile = g_key_file_new ();
user_local_save_to_keyfile (user, keyfile);
error = NULL;
data = g_key_file_to_data (keyfile, NULL, &error);
if (error == ... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,274 | throw_error (GDBusMethodInvocation *context,
gint error_code,
const gchar *format,
...)
{
va_list args;
gchar *message;
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
... | null | 0 | throw_error (GDBusMethodInvocation *context,
gint error_code,
const gchar *format,
...)
{
va_list args;
gchar *message;
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,275 | user_change_real_name_authorized_cb (Daemon *daemon,
User *user,
GDBusMethodInvocation *context,
gpointer data)
{
gchar *name = data;
GError *erro... | null | 0 | user_change_real_name_authorized_cb (Daemon *daemon,
User *user,
GDBusMethodInvocation *context,
gpointer data)
{
gchar *name = data;
GError *erro... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,276 | user_local_get_object_path (User *user)
{
return user->object_path;
}
| null | 0 | user_local_get_object_path (User *user)
{
return user->object_path;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,277 | user_local_get_shell(User *user)
{
return user->shell;
}
| null | 0 | user_local_get_shell(User *user)
{
return user->shell;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,278 | user_local_get_system_account (User *user)
{
return user->system_account;
}
| null | 0 | user_local_get_system_account (User *user)
{
return user->system_account;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,279 | user_local_get_uid (User *user)
{
return user->uid;
}
| null | 0 | user_local_get_uid (User *user)
{
return user->uid;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,280 | user_local_get_user_name (User *user)
{
return user->user_name;
}
| null | 0 | user_local_get_user_name (User *user)
{
return user->user_name;
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,281 | user_local_register (User *user)
{
GError *error = NULL;
user->system_bus_connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
if (user->system_bus_connection == NULL) {
if (error != NULL) {
g_critical ("error getting system bus: %s", error->mes... | null | 0 | user_local_register (User *user)
{
GError *error = NULL;
user->system_bus_connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
if (user->system_bus_connection == NULL) {
if (error != NULL) {
g_critical ("error getting system bus: %s", error->mes... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,282 | user_local_save_to_keyfile (User *user,
GKeyFile *keyfile)
{
if (user->email)
g_key_file_set_string (keyfile, "User", "Email", user->email);
if (user->language)
g_key_file_set_string (keyfile, "User", "Language", user->language);
... | null | 0 | user_local_save_to_keyfile (User *user,
GKeyFile *keyfile)
{
if (user->email)
g_key_file_set_string (keyfile, "User", "Email", user->email);
if (user->language)
g_key_file_set_string (keyfile, "User", "Language", user->language);
... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,283 | user_local_unregister (User *user)
{
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (user));
}
| null | 0 | user_local_unregister (User *user)
{
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (user));
}
| @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,284 | user_local_update_from_keyfile (User *user,
GKeyFile *keyfile)
{
gchar *s;
g_object_freeze_notify (G_OBJECT (user));
s = g_key_file_get_string (keyfile, "User", "Language", NULL);
if (s != NULL) {
/* TODO: validate / normalize */
... | null | 0 | user_local_update_from_keyfile (User *user,
GKeyFile *keyfile)
{
gchar *s;
g_object_freeze_notify (G_OBJECT (user));
s = g_key_file_get_string (keyfile, "User", "Language", NULL);
if (s != NULL) {
/* TODO: validate / normalize */
... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,285 | user_local_update_from_pwent (User *user,
struct passwd *pwent)
{
#ifdef HAVE_SHADOW_H
struct spwd *spent;
#endif
gchar *real_name;
gboolean changed;
const gchar *passwd;
gboolean locked;
PasswordMode mode;
g_object_freeze_n... | null | 0 | user_local_update_from_pwent (User *user,
struct passwd *pwent)
{
#ifdef HAVE_SHADOW_H
struct spwd *spent;
#endif
gchar *real_name;
gboolean changed;
const gchar *passwd;
gboolean locked;
PasswordMode mode;
g_object_freeze_n... | @@ -552,35 +552,21 @@ user_change_real_name_authorized_cb (Daemon *daemon,
accounts_user_complete_set_real_name (ACCOUNTS_USER (user), context);
}
-static uid_t
-method_invocation_get_uid (GDBusMethodInvocation *context)
-{
- const gchar *sender;
- PolkitSubject *busname;
- PolkitSubject *... | CWE-362 | null | null |
8,286 | get_caller_loginuid (GDBusMethodInvocation *context, gchar *loginuid, gint size)
{
PolkitSubject *subject;
gchar *cmdline;
gint pid;
gint uid;
gchar *path;
gchar *buf;
subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (context));
c... | null | 0 | get_caller_loginuid (GDBusMethodInvocation *context, gchar *loginuid, gint size)
{
PolkitSubject *subject;
gchar *cmdline;
gint pid;
gint uid;
gchar *path;
gchar *buf;
subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (context));
c... | @@ -251,22 +251,37 @@ get_user_groups (const gchar *user,
gboolean
-get_caller_uid (GDBusMethodInvocation *context, gint *uid)
+get_caller_uid (GDBusMethodInvocation *context,
+ gint *uid)
{
- PolkitSubject *subject;
- PolkitSubject *process;
+ GVariant *... | CWE-362 | null | null |
8,287 | get_user_groups (const gchar *user,
gid_t group,
gid_t **groups)
{
gint res;
gint ngroups;
ngroups = 0;
res = getgrouplist (user, group, NULL, &ngroups);
g_debug ("user %s has %d groups\n", user, ngroups);
*groups = g_new... | null | 0 | get_user_groups (const gchar *user,
gid_t group,
gid_t **groups)
{
gint res;
gint ngroups;
ngroups = 0;
res = getgrouplist (user, group, NULL, &ngroups);
g_debug ("user %s has %d groups\n", user, ngroups);
*groups = g_new... | @@ -251,22 +251,37 @@ get_user_groups (const gchar *user,
gboolean
-get_caller_uid (GDBusMethodInvocation *context, gint *uid)
+get_caller_uid (GDBusMethodInvocation *context,
+ gint *uid)
{
- PolkitSubject *subject;
- PolkitSubject *process;
+ GVariant *... | CWE-362 | null | null |
8,288 | setup_loginuid (gpointer data)
{
const char *id = data;
int fd;
fd = open ("/proc/self/loginuid", O_WRONLY);
write (fd, id, strlen (id));
close (fd);
}
| null | 0 | setup_loginuid (gpointer data)
{
const char *id = data;
int fd;
fd = open ("/proc/self/loginuid", O_WRONLY);
write (fd, id, strlen (id));
close (fd);
}
| @@ -251,22 +251,37 @@ get_user_groups (const gchar *user,
gboolean
-get_caller_uid (GDBusMethodInvocation *context, gint *uid)
+get_caller_uid (GDBusMethodInvocation *context,
+ gint *uid)
{
- PolkitSubject *subject;
- PolkitSubject *process;
+ GVariant *... | CWE-362 | null | null |
8,289 | sys_log (GDBusMethodInvocation *context,
const gchar *format,
...)
{
va_list args;
gchar *msg;
va_start (args, format);
msg = g_strdup_vprintf (format, args);
va_end (args);
if (context) {
PolkitSubject ... | null | 0 | sys_log (GDBusMethodInvocation *context,
const gchar *format,
...)
{
va_list args;
gchar *msg;
va_start (args, format);
msg = g_strdup_vprintf (format, args);
va_end (args);
if (context) {
PolkitSubject ... | @@ -251,22 +251,37 @@ get_user_groups (const gchar *user,
gboolean
-get_caller_uid (GDBusMethodInvocation *context, gint *uid)
+get_caller_uid (GDBusMethodInvocation *context,
+ gint *uid)
{
- PolkitSubject *subject;
- PolkitSubject *process;
+ GVariant *... | CWE-362 | null | null |
8,290 | FcCacheFindByAddr (void *object)
{
FcCacheSkip *ret;
lock_cache ();
ret = FcCacheFindByAddrUnlocked (object);
unlock_cache ();
return ret;
}
| Exec Code | 0 | FcCacheFindByAddr (void *object)
{
FcCacheSkip *ret;
lock_cache ();
ret = FcCacheFindByAddrUnlocked (object);
unlock_cache ();
return ret;
}
| @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,291 | FcCacheFindByAddrUnlocked (void *object)
{
int i;
FcCacheSkip **next = fcCacheChains;
FcCacheSkip *s;
if (!object)
return NULL;
/*
* Walk chain pointers one level at a time
*/
for (i = fcCacheMaxLevel; --i >= 0;)
while (next[i] && (char *) object >= ((char *) next[i]->cac... | Exec Code | 0 | FcCacheFindByAddrUnlocked (void *object)
{
int i;
FcCacheSkip **next = fcCacheChains;
FcCacheSkip *s;
if (!object)
return NULL;
/*
* Walk chain pointers one level at a time
*/
for (i = fcCacheMaxLevel; --i >= 0;)
while (next[i] && (char *) object >= ((char *) next[i]->cac... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,292 | FcCacheFindByStat (struct stat *cache_stat)
{
FcCacheSkip *s;
lock_cache ();
for (s = fcCacheChains[0]; s; s = s->next[0])
if (s->cache_dev == cache_stat->st_dev &&
s->cache_ino == cache_stat->st_ino &&
s->cache_mtime == cache_stat->st_mtime)
{
#ifdef HAVE_STRUCT_STAT_ST_MTIM
if (s->ca... | Exec Code | 0 | FcCacheFindByStat (struct stat *cache_stat)
{
FcCacheSkip *s;
lock_cache ();
for (s = fcCacheChains[0]; s; s = s->next[0])
if (s->cache_dev == cache_stat->st_dev &&
s->cache_ino == cache_stat->st_ino &&
s->cache_mtime == cache_stat->st_mtime)
{
#ifdef HAVE_STRUCT_STAT_ST_MTIM
if (s->ca... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,293 | FcCacheFini (void)
{
int i;
for (i = 0; i < FC_CACHE_MAX_LEVEL; i++)
assert (fcCacheChains[i] == NULL);
assert (fcCacheMaxLevel == 0);
free_lock ();
}
| Exec Code | 0 | FcCacheFini (void)
{
int i;
for (i = 0; i < FC_CACHE_MAX_LEVEL; i++)
assert (fcCacheChains[i] == NULL);
assert (fcCacheMaxLevel == 0);
free_lock ();
}
| @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,294 | FcCacheInsert (FcCache *cache, struct stat *cache_stat)
{
FcCacheSkip **update[FC_CACHE_MAX_LEVEL];
FcCacheSkip *s, **next;
int i, level;
lock_cache ();
/*
* Find links along each chain
*/
next = fcCacheChains;
for (i = fcCacheMaxLevel; --i >= 0; )
{
for (; (s = n... | Exec Code | 0 | FcCacheInsert (FcCache *cache, struct stat *cache_stat)
{
FcCacheSkip **update[FC_CACHE_MAX_LEVEL];
FcCacheSkip *s, **next;
int i, level;
lock_cache ();
/*
* Find links along each chain
*/
next = fcCacheChains;
for (i = fcCacheMaxLevel; --i >= 0; )
{
for (; (s = n... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,295 | FcCacheIsMmapSafe (int fd)
{
enum {
MMAP_NOT_INITIALIZED = 0,
MMAP_USE,
MMAP_DONT_USE,
MMAP_CHECK_FS,
} status;
static void *static_status;
status = (intptr_t) fc_atomic_ptr_get (&static_status);
if (status == MMAP_NOT_INITIALIZED)
{
const char *env = getenv ("FONTCONF... | Exec Code | 0 | FcCacheIsMmapSafe (int fd)
{
enum {
MMAP_NOT_INITIALIZED = 0,
MMAP_USE,
MMAP_DONT_USE,
MMAP_CHECK_FS,
} status;
static void *static_status;
status = (intptr_t) fc_atomic_ptr_get (&static_status);
if (status == MMAP_NOT_INITIALIZED)
{
const char *env = getenv ("FONTCONF... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,296 | FcCacheObjectDereference (void *object)
{
FcCacheSkip *skip;
lock_cache ();
skip = FcCacheFindByAddrUnlocked (object);
if (skip)
{
if (FcRefDec (&skip->ref) == 1)
FcDirCacheDisposeUnlocked (skip->cache);
}
unlock_cache ();
}
| Exec Code | 0 | FcCacheObjectDereference (void *object)
{
FcCacheSkip *skip;
lock_cache ();
skip = FcCacheFindByAddrUnlocked (object);
if (skip)
{
if (FcRefDec (&skip->ref) == 1)
FcDirCacheDisposeUnlocked (skip->cache);
}
unlock_cache ();
}
| @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,297 | FcCacheObjectReference (void *object)
{
FcCacheSkip *skip = FcCacheFindByAddr (object);
if (skip)
FcRefInc (&skip->ref);
}
| Exec Code | 0 | FcCacheObjectReference (void *object)
{
FcCacheSkip *skip = FcCacheFindByAddr (object);
if (skip)
FcRefInc (&skip->ref);
}
| @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,298 | FcCacheRemoveUnlocked (FcCache *cache)
{
FcCacheSkip **update[FC_CACHE_MAX_LEVEL];
FcCacheSkip *s, **next;
int i;
/*
* Find links along each chain
*/
next = fcCacheChains;
for (i = fcCacheMaxLevel; --i >= 0; )
{
for (; (s = next[i]); next = s->next)
if (s->cache... | Exec Code | 0 | FcCacheRemoveUnlocked (FcCache *cache)
{
FcCacheSkip **update[FC_CACHE_MAX_LEVEL];
FcCacheSkip *s, **next;
int i;
/*
* Find links along each chain
*/
next = fcCacheChains;
for (i = fcCacheMaxLevel; --i >= 0; )
{
for (; (s = next[i]); next = s->next)
if (s->cache... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
8,299 | FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
{
struct stat dir_static;
FcBool fnano = FcTrue;
if (!dir_stat)
{
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
FcChar8 *d;
if (sysroot)
d = FcStrBuildFilename (sysroot, FcCacheDir (cache), NULL);
else
d =... | Exec Code | 0 | FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
{
struct stat dir_static;
FcBool fnano = FcTrue;
if (!dir_stat)
{
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
FcChar8 *d;
if (sysroot)
d = FcStrBuildFilename (sysroot, FcCacheDir (cache), NULL);
else
d =... | @@ -27,6 +27,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
@@ -587,6 +588,82 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
return cache->checksum == (int) dir_stat->st_mtime... | CWE-415 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.