[Poppler-bugs] [Bug 37189] patch to fix a bad memory access when a character starts to the left of the image

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 21 15:33:06 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37189

--- Comment #5 from William Bader <williambader at hotmail.com> 2011-07-21 15:33:05 PDT ---
> If as you say when glyph->aa is false we use one bit per pixel aren't we using
> two pixels by using the | operator?

I tried a few things. The code in the patch seemed to work without doing a bad
memory access or making a corrupt image.
I think that it has 1 bit per pixel but 8 bits (pixels) per byte.
The patch forms a byte with xShift bits from the high side of p[xx/8] and
8-xShift bits from the low side of p[xx/8+1].  The later test for alpha0 & 0x80
extracts a single bit each time around the loop.  The loop cycles through the
bits with alpha0 <<= 1 at the end of each iteration.

William

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list