...
Code Block | ||
---|---|---|
| ||
pen->num_vertices = _cairo_pen_vertices_needed( gstate->tolerance, radius, &gstate->ctm ); pen->vertices = malloc(pen->num_vertices * sizeof(cairo_pen_vertex_t)); |
...
Code Block | ||
---|---|---|
| ||
pen->num_vertices = _cairo_pen_vertices_needed( gstate->tolerance, radius, &gstate->ctm ); if (pen->num_vertices > SIZE_MAX/sizeof(cairo_pen_vertex_t)) { /* handle error condition */ } pen->vertices = malloc(pen->num_vertices * sizeof(cairo_pen_vertex_t)); |
...
Code Block | ||
---|---|---|
| ||
unsigned int ui1, ui2, uresult; if ( (ui2 >= sizeof(unsigned int)*CHAR_BIT) || (ui1 > (UINT_MAX >> ui2))) ) { /* handle error condition */ } else { uresult = ui1 << ui2; } |
...