[cairo] [PATCH cairo v2 0/8] Coverity fixes
Bryce Harrington
bryce at bryceharrington.org
Wed Jun 13 23:11:11 UTC 2018
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.
> 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:
== Ubuntu 16.04.4 results ==
$ make test TARGETS=image,pdf,script FORMAT=rgba
trunk: 347 Passed, 210 Failed [0 crashed, 16 expected], 21 Skipped
patched: 347 Passed, 210 Failed [0 crashed, 16 expected], 21 Skipped
== Ubuntu 18.04 results (image backend only) ==
$ make test TARGETS=image FORMAT=rgba
trunk: 495 Passed, 55 Failed [0 crashed, 14 expected], 28 Skipped
patched: 495 Passed, 55 Failed [0 crashed, 14 expected], 28 Skipped
Hopefully you also see no failure deltas; let me know if otherwise.
Patch 6 also gives the same testsuite results, no added failures.
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'.
More information about the cairo
mailing list