Re: [PATCH wpan-tools 0/4] Coverity fixes for wpan-ping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 10/11/15 22:42, Stefan Schmidt wrote:
Hello.

I finished setting up Travis CI for builds and Coverity Scan service for wpan-tools on a private
GitHub fork. If nobody has a strong opinion against this I would like to set it up on the main repo
so we can have a first step towards some automated QA infrastructure.

This is done now. Will send a separate mail with more details about it.

But lets first have a look at the results from this first run. As you can see on the our first
run revealed 4 defects in 23321 lines of code (after the C preprocessor). With a defect density
of 0.17 this is way below industry average which is set to one here. In other words this means
we only have 1.7 defects per 10000 lines of code.

Three of these have been problems in error pathes of the code (leak, no check on return value, etc)
and one have been a false positive in the main iwpan.c file. Coverity was not able to understand
that we set err in our netlinks callbacks and thought this code bit would never stop as we start
with err = 1

while (err > 0)
	nl_recvmsgs(state->nl_sock, cb);

I marked it as false positive and fixed the remaining three defects with the patches below.

Stefan Schmidt (4):
   wpan-ping: remove unused struct sockaddr_nl variable
   wpan-ping: check return value for setsockopt
   wpan-ping: do not try to send data back to origin if we got an error
     from recvfrom
   wpan-ping: avoid leaking socket handle on error path

  wpan-ping/wpan-ping.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)


Pushed these now.

regards
Stefan Schmidt
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux