[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ...
From: |
Udo Giacomozzi |
Subject: |
Re[2]: [Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ... |
Date: |
Wed, 7 Mar 2007 00:01:37 +0100 |
Hello Bastiaan,
Tuesday, March 6, 2007, 11:46:30 PM, you wrote:
BJ> It can be correct only if region.width() < xres.
Exactly
BJ> Which is not always true;
...most probably because of other reasons. As long getMinX() and
getMaxX() are within valid coordinates, we have no problem. In the
extreme case:
getMinX() = 0
getMaxX() = 639
xres = 640
width = getMaxX() - getMinX() + 1 = 639 - 0 + 1 = 640 = xres
So I guess either getMinX() or getMaxX() are out of the valid range. I
committed a growBy() patch today, which may the reason for this
problem.
I can't fix this before tomorrow.
BJ> therefore this code will sometimes try to copy xres+1 bytes from the agg
BJ> buffer. So I guess what we want is:
BJ> unsigned width = region.width();
BJ> if (width < xres) {
BJ> width++;
BJ> }
BJ> Does that look okay to you?
Nope. This will probably still segfault when getMinX() > 0 and is just
a workaround, not a solution, anyway.
Udo