[cairo] [PATCH 1/2] xlib: Don't crash when swapping a 0-sized glyph

Uli Schlachter psychon at znc.in
Fri Nov 16 10:59:52 PST 2012

On 16.11.2012 19:04, Adam Jackson wrote:
> On Thu, 2012-11-08 at 12:19 -0500, Adam Jackson wrote:
>> On 10/31/12 4:13 PM, Adam Jackson wrote:
>>> malloc(0) needn't return NULL, and on glibc, doesn't.  Then we encounter
>>> a loop of the form do { ... } while (--c), which doesn't do quite what
>>> you were hoping for when c is initially 0.
>>> Since there's nothing to swap in this case, just bomb out.
>> Bump.  Anything else I need to add here?
> Another week, another ping.

Pong :-P

I haven't forgotten this patch. However, I have no clue what the original
"server crashes on 0x0 glyphs" bug is about nor if we want to keep the
work-around for that. My hope is that the almighty Chris could help us here.

Also, I would like to see a test case for this. Dunno if that would need
user-fonts or if it could be done via drawing " "...

If you have to type the letters "A-E-S" into your source code, you're doing it

More information about the cairo mailing list