Client: Secure uicb_client_resize

This commit is contained in:
Martin Duquesnoy 2009-08-01 01:45:23 +02:00
parent 33a7864da2
commit b8f633c9f1

View File

@ -1043,10 +1043,10 @@ uicb_client_resize(uicb_t cmd)
if(sscanf(cmd, "%d %d", &wi, &hi))
{
geo.width += ((geo.width + wi > 0) ? wi : 0);
geo.height += ((geo.height + hi > 0) ? hi : 0);
geo.width += ((geo.width + wi > sel->minw && geo.width + wi < 65536) ? wi : 0);
geo.height += ((geo.height + hi > sel->minh && geo.height + hi < 65536) ? hi : 0);
client_moveresize(sel, geo, True);
client_moveresize(sel, geo, False);
}
return;