This patchset fixes several compiler warnings in the v0.42.rc1 libcgroup release candidate.
The first patch also likely fixes a segfault on systems with a newer version of bison, but I don't have enough testing in to unequivocally say this. I really like the recommended solutions outlined in this whitepaper [1] for dealing with string truncation, but with the minimal number of tests in place, I don't feel comfortable making the recommended changes this late in a release. Most of the offending lines of code are using strings with 4096 characters for the path which should meet the needs of 99%+ of our users. I would prefer adding a release note rather than make risky last minute changes. Changes from v1 to v2: * Gave credit to Nikola and Michal on patch #1 * Added six more patches for issues uncovered by Coverity * Updated the cover letter comment regarding the status of truncated strings in libcgroup The branch is available on github here: https://github.com/drakenclimber/libcgroup/tree/issues/fix_warnings2 Code coverage remained unchanged: https://coveralls.io/builds/27964992 All automated tests passed: https://github.com/drakenclimber/libcgroup/runs/378125130 [1] https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Tom Hromatka (14): parse.y: Fix type declaration for group_name cgrulesengd: Fix improper indentation warning api.c: Fix warning caused by misplaced const keyword api.c: Fix warning caused by misplaced const keyword api.c: Fix warning caused by misplaced const keyword api.c: Fix string truncation warning api.c: Fix string truncation warning api.c: Fix string truncation warning config.c: Fix Coverity warning about uninitialized pointer read cgrulesengd: Fix Coverity warnings about a socket leak config.c: Silence Coverity warning about unterminated string api.c: Fix double free in cgroup_create_template_group() wrapper.c: Fix buffer not null terminated Coverity warning wrapper.c: Fix potentially unterminated strings src/api.c | 13 +++++++------ src/config.c | 3 ++- src/daemon/cgrulesengd.c | 12 ++++++------ src/parse.y | 4 ++-- src/wrapper.c | 3 +++ 5 files changed, 20 insertions(+), 15 deletions(-) -- 1.8.3.1 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel