From: Matthew Fernandez Date: Sun, 3 Jan 2021 01:25:19 +0000 (-0800) Subject: fix: use public inheritance in VPSC hierarchy X-Git-Tag: 2.47.0~75^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9afb5b1a15eef2c94998114f82ab35c8e027696;p=graphviz fix: use public inheritance in VPSC hierarchy This removes some C++ undefined behavior where libvpsc casts of IncVPSC pointers to VPSC pointers were invalid due to private inheritance. There was no need to use private inheritance here, so we now simply use public inheritance. Fixes #1874. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 64a5933d9..0559b26d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - typos in gpcanvas.c #1927 - memory leak in libmingle +- private inheritance in IncVPSC #1874 ## [2.46.0] - 2021-02-13 diff --git a/lib/vpsc/solve_VPSC.h b/lib/vpsc/solve_VPSC.h index a295df967..9aa931a23 100644 --- a/lib/vpsc/solve_VPSC.h +++ b/lib/vpsc/solve_VPSC.h @@ -43,7 +43,7 @@ private: bool blockGraphIsCyclic(); }; -struct IncVPSC : private VPSC { +struct IncVPSC : VPSC { public: unsigned splitCnt; void satisfy();