[ovs-dev] [PATCH 00/11] Fix clang static analysis null pointer bugs.

William Tu u9012063 at gmail.com
Sat Oct 28 17:31:47 UTC 2017


Before the patch, the scan-build reports 46 bugs found.
The patch series fix the clang static checker bug group:
"Argument with nonnull attribute passed null"
Most of the fixes are adding "ovs_assert" to tell the checker
that the pointer won't be null. Now the bugs count reduces to 35.
Tested it by doing "make clang-analyze"

William Tu (11):
  dp-packet: fix possible null pointer argument
  ovn-controller: Fix possible null pointer in memcmp.
  ovs-appctl: Fix possible null pointer argument.
  lib/process: Fix possible null pointer argument.
  ovs-ofctl: Fix possible null pointer.
  packets: Fix possible null pointer argument to memmove.
  packets: Fix possible null pointer to memcmp.
  ovn-sbctl: Fix possible null pointer to qsort.
  tnl-neigh-cache: Fix possible null pointer.
  lib: Fix possible null pointer to execvp.
  ovs-testcontroller: Fix possible null pointer to atoi.

 lib/dp-packet.c                | 1 +
 lib/packets.c                  | 2 ++
 lib/process.c                  | 2 ++
 lib/tnl-neigh-cache.c          | 3 +++
 ovn/controller/pinctrl.c       | 1 +
 ovn/utilities/ovn-sbctl.c      | 1 +
 utilities/ovs-appctl.c         | 1 +
 utilities/ovs-ofctl.c          | 1 +
 utilities/ovs-testcontroller.c | 2 ++
 9 files changed, 14 insertions(+)

-- 
2.7.4



More information about the dev mailing list