Project

General

Profile

Bug #90 ยป 0014-Qt-Remove-zealous_crop_rect-use-of-VLA-in-C-code.patch

Marko Lindqvist, 12/29/2023 07:09 AM

View differences:

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));
}
    (1-1/1)