summaryrefslogtreecommitdiff
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
authorFerenc Wagner <wferi@niif.hu>2011-08-25 16:44:57 +0400
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 10:57:29 +0400
commit8af3d8d5bc75914a01fe41839474902f2c6b79b9 (patch)
tree1aa10850f0fd2551a9036c87edc7b6efccf25b72 /drivers/message/fusion/mptbase.h
parentcd6dbb038a191b1bea34819de547f66a2187e309 (diff)
downloadlinux-8af3d8d5bc75914a01fe41839474902f2c6b79b9.tar.xz
[SCSI] fusion: ensure NUL-termination of MptCallbacksName elements
Using strlcpy instead of memcpy makes the strlen() calls superfluous and also ensures zero-termination of the copied string. At the same time get rid of the magic constant 50. Actually, I can't see why copying the callback name is necessary instead of simply storing a pointer to it (just like to the callback function itself), but that goes beyond the scope of this fix. Signed-off-by: Ferenc Wagner <wferi@niif.hu> Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r--drivers/message/fusion/mptbase.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index b4d24dc081ae..76c05bc24cb7 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -89,6 +89,7 @@
*/
#define MPT_MAX_ADAPTERS 18
#define MPT_MAX_PROTOCOL_DRIVERS 16
+#define MPT_MAX_CALLBACKNAME_LEN 49
#define MPT_MAX_BUS 1 /* Do not change */
#define MPT_MAX_FC_DEVICES 255
#define MPT_MAX_SCSI_DEVICES 16