[cairo] [PATCH cairo v2 0/8] Coverity fixes

Uli Schlachter psychon at znc.in
Fri Jun 15 16:55:15 UTC 2018


On 14.06.2018 01:11, Bryce Harrington wrote:
> On Wed, Jun 13, 2018 at 07:54:45PM +0200, Uli Schlachter wrote:
>> Patches 1, 3, 4, 5, 7, and 8 (well, and 2) are
>>
>> Reviewed-By: Uli Schlachter <psychon at znc.in>
>>
>> I ran into a mental timeout when staring at Patch 6, so I skipped that
>> one (for now?).
>  
> Thanks for reviewing the 7, I'll push those now.  Patch 6 I think is
> good but will hold off for you to look at it more.

Well, okay. The patch looks fine and I am not even sure what my problem
was last time I looked at it.

>> I have one remaining question: The test suite is happy with this and
>> doesn't hit the new assertions, right?
> 
> It seems to be, yes.  It looks like the patches only affect the image,
> pdf, and script backends so limiting the test run to just those:
> 
[...]
> 
> Hopefully you also see no failure deltas; let me know if otherwise.

I didn't try. :-)
Just wanted to make sure someone did try.

Uli

> 
> Bryce
> 
>> On 13.06.2018 02:35, Bryce Harrington wrote:
>>> This patchset attempts to fix a handful of Cairo issues found by
>>> Coverity.  A lot of the Coverity results seem to be false positives, but
>>> these look legit.
>>>
>>> The first three patches were presented in the v1 of this series and have
>>> been updated based on Uli's review feedback.  The remainder are new in
>>> this series.  Patch #4 was suggested by Uli.  Patches 5, 6, and 7 I'm
>>> fairly confident were just cut-and-paste typos, but a sanity check would
>>> be appreciated on them.
>>>
>>> Patch 8 deserves closer scrutiny.  The coverity issue is legit as the
>>> code is indeed doing something ugly, but I'm not sure my fix is correct.
>>>
>>> Bryce Harrington (8):
>>>   script-surface: Check for invalid ids (CID #1159557, 1159558)
>>>   bo: Check null return from _cairo_malloc_ab() (CID #1159556)
>>>   snapshot: Don't use extra after it's been freed (CID #220086)
>>>   bo: Free event_y in case of error to prevent memory leak (CID
>>>     ##1160682)
>>>   pdf: Fix potential null ptr deref when creating smask groups (CID
>>>     #1159559)
>>>   scaled-font: Fix glyph and cluster count checks (CID #983386)
>>>   type1-subset: Fix incorrect null ptr check from find_token() (CID
>>>     #1160662)
>>>   polygon-intersection: Clarify ptr checks for right edges (CID
>>>     #1160730)
>>>
>>>  src/cairo-bentley-ottmann.c   | 12 +++++++++---
>>>  src/cairo-pdf-surface.c       |  1 -
>>>  src/cairo-polygon-intersect.c |  5 +++--
>>>  src/cairo-scaled-font.c       |  4 ++--
>>>  src/cairo-script-surface.c    |  1 +
>>>  src/cairo-surface-snapshot.c  |  5 ++++-
>>>  src/cairo-type1-subset.c      |  2 +-
>>>  util/cairo-trace/trace.c      |  2 ++
>>>  8 files changed, 22 insertions(+), 10 deletions(-)
>>>
>>
>>
>> -- 
>> - He wants the impossible...!
>> - That's the short definition of 'captain'.


-- 
Sent from my Game Boy.


More information about the cairo mailing list