linux/drivers/target
Dan Carpenter 60d645a4e9 target: Fix incorrect strlen() NULL terminator checks
This patch fixes a number of cases in target core using an incorrectly

	if (strlen(foo) > SOME_MAX_SIZE)

As strlen() returns the number of characters in the string not counting
the NULL character at the end.  So if you do something like:

        char buf[10];

        if (strlen("0123456789") > 10)
                return -ETOOLONG;
        snprintf(buf, 10, "0123456789");
        printf("%s\n", buf);

then the last "9" gets chopped off and only "012345678" is printed.

Plus I threw in one small related cleanup.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2011-06-24 00:08:11 +00:00
..
loopback target: Fix incorrect strlen() NULL terminator checks 2011-06-24 00:08:11 +00:00
tcm_fc target: Fix ERR_PTR dereferencing bugs 2011-06-24 00:03:27 +00:00
Kconfig [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support 2011-05-17 10:52:46 +04:00
Makefile [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support 2011-05-17 10:52:46 +04:00
target_core_alua.c Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
target_core_alua.h
target_core_cdb.c [SCSI] target: Fix volume size misreporting for volumes > 2TB 2011-03-14 18:31:08 -05:00
target_core_configfs.c target: Fix incorrect strlen() NULL terminator checks 2011-06-24 00:08:11 +00:00
target_core_device.c target: Fix incorrect strlen() NULL terminator checks 2011-06-24 00:08:11 +00:00
target_core_fabric_configfs.c [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_fabric_lib.c Fix common misspellings 2011-03-31 11:26:23 -03:00
target_core_file.c Fix common misspellings 2011-03-31 11:26:23 -03:00
target_core_file.h
target_core_hba.c [SCSI] target: Remove unnecessary hba_dev_list walk and se_clear_dev_ports legacy code 2011-03-23 11:36:27 -05:00
target_core_hba.h
target_core_iblock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2011-03-25 21:06:13 -07:00
target_core_iblock.h
target_core_pr.c target: Fix incorrect strlen() NULL terminator checks 2011-06-24 00:08:11 +00:00
target_core_pr.h
target_core_pscsi.c [SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions 2011-05-24 13:03:56 -04:00
target_core_pscsi.h
target_core_rd.c [SCSI] target: Convert rd_build_device_space() to use errno 2011-03-23 11:36:32 -05:00
target_core_rd.h [SCSI] target: Minor sparse warning fixes and annotations 2011-03-23 11:36:29 -05:00
target_core_scdb.c
target_core_scdb.h
target_core_stat.c [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_stat.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_tmr.c target: Fix transport_get_lun_for_tmr failure cases 2011-06-23 23:59:45 +00:00
target_core_tpg.c drivers: remove extraneous includes of smp_lock.h 2011-03-02 00:02:40 +01:00
target_core_transport.c target: Convert transport_deregister_session_configfs nacl_sess_lock to save irq state 2011-06-23 23:59:45 +00:00
target_core_ua.c Fix common misspellings 2011-03-31 11:26:23 -03:00
target_core_ua.h