Fix off-by-one OOB read in __imlib_MergeUpdate().

Patch by Yuriy M. Kaminskiy.

https://bugs.debian.org/819818
This commit is contained in:
Kim Woelders 2016-04-06 02:35:43 +02:00
parent 16de244bd0
commit ce94edca1c
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ __imlib_MergeUpdate(ImlibUpdate * u, int w, int h, int hgapmax)
int xx, yy, ww, hh, ok, xww;
for (xx = x + 1, ww = 1;
(T(xx, y).used & T_USED) && (xx < tw); xx++, ww++);
(xx < tw) && (T(xx, y).used & T_USED); xx++, ww++);
xww = x + ww;
for (yy = y + 1, hh = 1, ok = 1;
(yy < th) && (ok); yy++, hh++)