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

Uli Schlachter psychon at znc.in
Wed Jun 13 17:54:45 UTC 2018


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?).

I have one remaining question: The test suite is happy with this and
doesn't hit the new assertions, right?

Cheers,
Uli

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'.


More information about the cairo mailing list