Re: Fix a thinko in color glyph support
Petr Kobalíček <[email protected]> Sun, 14 Jul 2019 17:13:48 +0200
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAB2Z3Oe2Rqj823NxOGPx0434=0+KNqPsUJFPG1ObN5Fi=MdA6A@mail.gmail.com> |
--===============1611375290== Content-Type: multipart/alternative; boundary="00000000000012f0da058da59855" --00000000000012f0da058da59855 Content-Type: text/plain; charset="UTF-8" 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 <[email protected]> wrote: > > On Fri, May 31, 2019 at 9:59 AM Matthias Clasen <[email protected]> > 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 > [email protected] > https://lists.cairographics.org/mailman/listinfo/cairo --00000000000012f0da058da59855 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">nitpick:<br><br>=C2=A0 - else branch is redundant, utf8_co= py is already NULL<div>=C2=A0 - malloc result should be checked and if NULL= status should be changed to OOM?</div><div>=C2=A0 - ideally a small static= buffer should be used for small strings to avoid malloc/free?</div><div><b= r></div><div>I'm not a cairo dev so it's just what I would have don= e.</div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr= " class=3D"gmail_attr">On Sun, Jul 14, 2019 at 4:45 PM Matthias Clasen <= <a href=3D"mailto:[email protected]">[email protected]</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div = dir=3D"ltr"><div dir=3D"ltr"><br></div>On Fri, May 31, 2019 at 9:59 AM Matt= hias Clasen <<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a>> wrote:<br><div class=3D"gmail_quote">= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>I&#= 39;ve spent some time tracking down a GTK+ / Pango crash ( <a href=3D"https= ://gitlab.gnome.org/GNOME/pango/issues/346" target=3D"_blank">https://gitla= b.gnome.org/GNOME/pango/issues/346</a> ).</div><div><br></div><div>Turns ou= t that there was a thinko in our original color glyph patch. We</div><div>c= an't modify the passed-in text.</div><div><br></div><div>Here is a quic= k fix:<br></div><div><br></div><div><a href=3D"https://github.com/matthiasc= lasen/cairo/commit/79ad01724161502e8d9d2bd384ff1f0174e5df6e" target=3D"_bla= nk">https://github.com/matthiasclasen/cairo/commit/79ad01724161502e8d9d2bd3= 84ff1f0174e5df6e</a></div><div><br></div><div>This probably needs to go int= o a stable cairo branch too.<br></div></div></blockquote><div><br></div><di= v>Hi, two months on, this is still not in git. It is a very easy memory cor= ruption 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=3D"mailto:[email protected]" target=3D"_blank">cairo@cairogra= phics.org</a><br> <a href=3D"https://lists.cairographics.org/mailman/listinfo/cairo" rel=3D"n= oreferrer" target=3D"_blank">https://lists.cairographics.org/mailman/listin= fo/cairo</a></blockquote></div> --00000000000012f0da058da59855-- --===============1611375290== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8= --===============1611375290==--