From 250929b44821a320745c5be6b5a0cd4f2b183eac Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 26 Feb 2009 20:02:43 +0000 Subject: [PATCH] Patch from Gal Rosen : There are 16 characters of the port_name + 7 characters of ":" + "\0" of sprintf = total 24 bytes. wwn_str has only 16 bytes. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@681 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla2x00-target/qla2x00t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 9cff3aad9..6f684c311 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -1308,7 +1308,7 @@ static char *q2t_find_name(scsi_qla_host_t *ha, int loop_id) char *wwn_str; fc_port_t *fcl; - wwn_str = kmalloc(2*WWN_SIZE, GFP_ATOMIC); + wwn_str = kmalloc(3*WWN_SIZE, GFP_ATOMIC); if (wwn_str == NULL) { TRACE(TRACE_OUT_OF_MEM, "%s", "Allocation of wwn_str failed"); goto out;