Since Emilio has set up ccan on Coverity Scan, here are some patches
making use of it. The first updates our Travis configuration to push
builds to Coverity for analysis. The rest fix some of the easier to
address bugs that Coverity located.
David Gibson (7):
.travis.yml: Add support for
make_listen_fd() didn't check for failure of setsockopt(). There's no
real reason not to, since we have an obvious way to report an error to the
caller.
Found with Coverity Scan.
Signed-off-by: David Gibson
---
ccan/net/net.c | 4 +++-
1 file changed, 3
options_avail and options_used get freed, but options does not.
Found by Coverity scan.
Signed-off-by: David Gibson
---
tools/ccanlint/tests/reduce_features.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/ccanlint/tests/reduce_features.c
struct ripemd160_ctx has a union for converting between u8[] and u32[]
data. Unfortunately the u32 array has a miscalculated size, half the size
of the u8 array. That means some accesses which are within the union can
technically overrun the u32 array.
Found by Coverity scan.
Signed-off-by:
compile_info() can leak an open file descriptor write_all() fails. This
corrects it.
Found by Coverity.
Signed-off-by: David Gibson
---
tools/depends.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/depends.c b/tools/depends.c
index
Somewhat ironically, a path in failtest related to detecting leaks in the
tested program itself leaks memory. This corrects it.
Detected by Coverity.
Signed-off-by: David Gibson
---
ccan/failtest/failtest.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
On Mon, Apr 03, 2017 at 09:11:06PM +1000, David Gibson wrote:
> Add support for Travis to upload builds to Coverity Scan.
>
> Travis encrypted keys are there which should make it work for builds
> at either:
> https://travis-ci.org/rustyrussell/ccan
> or
>