[REVIEW][3-5] fix STL assertion in vcl graphite code
pmladek at suse.cz
Tue Mar 6 03:23:02 PST 2012
Michael Stahl píše v St 29. 02. 2012 v 23:08 +0100:
> this patch fixes a STL assertion in GraphiteLayout::expandOrCondense;
> since i don't know how the multitude of arrays in there are supposed to
> be used, i thought it's probably a good idea to check the size of the
> array that will be indexed in the next line, as opposed to one that
> isn't mentioned in the block...
> in case this is the right fix, it should be applied to libreoffice-3-5,
> and possibly libreoffice-3-4 as well (haven't checked).
I do not understand the code either. I just wonder if it would make
sense to check for:
while (++nCharIndex - mnMinCharPos <
As the array is accessed as mvChar2BaseGlyph[nCharIndex-mnMinCharPos].
Otherwise, the cycle might end too early.
Another conservative solution would be to combine it with the original
while (++nCharIndex < static_cast<int>(mvGlyph2Char.size()) &&
nCharIndex - mnMinCharPos <
More information about the LibreOffice