Bug #90 ยป 0014-Qt-Remove-zealous_crop_rect-use-of-VLA-in-C-code.patch
client/gui-qt/canvas.cpp | ||
---|---|---|
{
|
||
int r, t, b, l;
|
||
int oh, ow;
|
||
QRgb *row;
|
||
ow = p.width();
|
||
l = ow;
|
||
... | ... | |
oh = p.height();
|
||
t = oh;
|
||
b = 0;
|
||
row = (QRgb *)fc_malloc(sizeof(QRgb) * ow);
|
||
for (int y = 0; y < oh; y++) {
|
||
QRgb row[ow];
|
||
bool row_filled = false;
|
||
int x;
|
||
... | ... | |
b = y;
|
||
}
|
||
}
|
||
free(row);
|
||
return QRect(l, t, qMax(0, r - l + 1), qMax(0, b - t + 1));
|
||
}
|