Commit e9a5704e authored by Benjamin Otte's avatar Benjamin Otte Committed by Matthias Clasen
Browse files

pixops: Don't overflow variables when shifting them

If we shift by 16 bits we need to be sure those 16 bits actually exist.
They do now.
parent 10b0b7e5
......@@ -264,11 +264,11 @@ pixops_scale_nearest (guchar *dest_buf,
double scale_x,
double scale_y)
int i;
int x;
int x_step = (1 << SCALE_SHIFT) / scale_x;
int y_step = (1 << SCALE_SHIFT) / scale_y;
int xmax, xstart, xstop, x_pos, y_pos;
gint64 i;
gint64 x;
gint64 x_step = (1 << SCALE_SHIFT) / scale_x;
gint64 y_step = (1 << SCALE_SHIFT) / scale_y;
gint64 xmax, xstart, xstop, x_pos, y_pos;
const guchar *p;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment