Whamcloud - gitweb
LU-4629 lnet: fix issues found by Klocwork Insight tool 86/9386/5
authorDmitry Eremin <dmitry.eremin@intel.com>
Tue, 25 Feb 2014 18:44:09 +0000 (22:44 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Mar 2014 18:48:49 +0000 (18:48 +0000)
commit3315344dfa4c25006e213afbd8872b5cc5c9a02c
tree478a8cd159a694ed485636b65a96fdcffbd2c705
parent11c946229c51e98d26b8a25fd592f190f098764b
LU-4629 lnet: fix issues found by Klocwork Insight tool

Null pointer 'cp' that comes from line 2544 may be dereferenced
at line 2618.

Pointer 'ni' checked for NULL at line 1569 may be passed to
function and may be dereferenced there by passing argument 1 to
function 'lnet_ni_notify_locked' at line 1621.

Null pointer 'best_iface' that comes from line 802 may be
dereferenced at line 832.

Buffer overflow of string buffer due to non null terminated string.

sscanf format specification '%lx' expects type 'unsigned long int *'
for 'x', but parameter 4 has a different type 'long int*'.

Pointer 'tsc' returned from call to function 'sfw_find_test_case'
at line 571 may be NULL and will be dereferenced at line 572.

sscanf format specification '%i' expects type 'int *' for 'i',
but parameter 3 has a different type 'unsigned int*'.

Local variable 'hash' is never used.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I2a942735cd93906453b92dcc711a956b7adf5615
Reviewed-on: http://review.whamcloud.com/9386
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd_cb.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/api-ni.c
lnet/lnet/router.c
lnet/selftest/conctl.c
lnet/selftest/framework.c
lnet/utils/debug.c
lnet/utils/portals.c