[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] Fix a thinko in color glyph support
From:       Petr Kobalíček <kobalicek.petr () gmail ! com>
Date:       2019-07-14 15:13:48
Message-ID: CAB2Z3Oe2Rqj823NxOGPx0434=0+KNqPsUJFPG1ObN5Fi=MdA6A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


nitpick:

  - else branch is redundant, utf8_copy is already NULL
  - malloc result should be checked and if NULL status should be changed to
OOM?
  - ideally a small static buffer should be used for small strings to avoid
malloc/free?

I'm not a cairo dev so it's just what I would have done.


On Sun, Jul 14, 2019 at 4:45 PM Matthias Clasen <matthias.clasen@gmail.com>
wrote:

>
> On Fri, May 31, 2019 at 9:59 AM Matthias Clasen <matthias.clasen@gmail.com>
> wrote:
>
>> I've spent some time tracking down a GTK+ / Pango crash (
>> https://gitlab.gnome.org/GNOME/pango/issues/346 ).
>>
>> Turns out that there was a thinko in our original color glyph patch. We
>> can't modify the passed-in text.
>>
>> Here is a quick fix:
>>
>>
>> https://github.com/matthiasclasen/cairo/commit/79ad01724161502e8d9d2bd384ff1f0174e5df6e
>>
>> This probably needs to go into a stable cairo branch too.
>>
>
> Hi, two months on, this is still not in git. It is a very easy memory
> corruption patch.
> We ship the patch in Fedora, but I would prefer to not rely on distros to
> pick through
> the rubble. Can we get this merged, please ?
> --
> cairo mailing list
> cairo@cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo

[Attachment #5 (text/html)]

<div dir="ltr">nitpick:<br><br>   - else branch is redundant, utf8_copy is already \
NULL<div>   - malloc result should be checked and if NULL status should be changed to \
OOM?</div><div>   - ideally a small static buffer should be used for small strings to \
avoid malloc/free?</div><div><br></div><div>I&#39;m not a cairo dev so it&#39;s just \
what I would have done.</div><div><br></div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Sun, Jul 14, 2019 at 4:45 PM Matthias Clasen &lt;<a \
href="mailto:matthias.clasen@gmail.com">matthias.clasen@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
dir="ltr"><br></div>On Fri, May 31, 2019 at 9:59 AM Matthias Clasen &lt;<a \
href="mailto:matthias.clasen@gmail.com" \
target="_blank">matthias.clasen@gmail.com</a>&gt; wrote:<br><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div>I&#39;ve spent some time tracking down a GTK+ / Pango crash ( <a \
href="https://gitlab.gnome.org/GNOME/pango/issues/346" \
target="_blank">https://gitlab.gnome.org/GNOME/pango/issues/346</a> \
).</div><div><br></div><div>Turns out that there was a thinko in our original color \
glyph patch. We</div><div>can&#39;t modify the passed-in \
text.</div><div><br></div><div>Here is a quick fix:<br></div><div><br></div><div><a \
href="https://github.com/matthiasclasen/cairo/commit/79ad01724161502e8d9d2bd384ff1f0174e5df6e" \
target="_blank">https://github.com/matthiasclasen/cairo/commit/79ad01724161502e8d9d2bd384ff1f0174e5df6e</a></div><div><br></div><div>This \
probably needs to go into a stable cairo branch \
too.<br></div></div></blockquote><div><br></div><div>Hi, two months on, this is still \
not in git. It is a very easy memory corruption patch.</div><div>We ship the patch in \
Fedora, but I would prefer to not rely on distros to pick through</div><div>the \
                rubble. Can we get this merged, please ?<br></div></div></div>
-- <br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" \
target="_blank">cairo@cairographics.org</a><br> <a \
href="https://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" \
target="_blank">https://lists.cairographics.org/mailman/listinfo/cairo</a></blockquote></div>



[Attachment #6 (text/plain)]

-- 
cairo mailing list
cairo@cairographics.org
https://lists.cairographics.org/mailman/listinfo/cairo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic