1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dticon: make sure min_x and min_y are within icon to avoid a

segfault.
This commit is contained in:
Liang Chang 2021-10-17 00:38:25 -06:00 committed by Jon Trulson
parent 16eb6092b0
commit 6a0990615d

View file

@ -837,6 +837,12 @@ Transfer_Back_Image(
max_x = ((x1 > x2) ? x1 : x2);
max_y = ((y1 > y2) ? y1 : y2);
/*** make sure min_x and min_y are within icon ***/
if (min_x < 0)
min_x = 0;
if (min_y < 0)
min_y = 0;
/*** make sure max_x and max_y are within icon ***/
if (max_x >= icon_width)
max_x = icon_width-1;