From patchwork Fri May 28 04:53:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bmarzins@sourceware.org X-Patchwork-Id: 102823 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4S4uEj9005634 for ; Fri, 28 May 2010 04:56:49 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4S4rjZX020998; Fri, 28 May 2010 00:53:47 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4S4rhom023495 for ; Fri, 28 May 2010 00:53:43 -0400 Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.14]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4S4rbn1019944 for ; Fri, 28 May 2010 00:53:37 -0400 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id o4S4rRkG022661 for ; Fri, 28 May 2010 00:53:27 -0400 Received: (qmail 10190 invoked by uid 9475); 28 May 2010 04:53:26 -0000 Date: 28 May 2010 04:53:26 -0000 Message-ID: <20100528045326.10188.qmail@sourceware.org> From: bmarzins@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.14 X-loop: dm-devel@redhat.com Subject: [dm-devel] multipath-tools/libmultipath discovery.c structs.h X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 28 May 2010 04:56:49 +0000 (UTC) --- multipath-tools/libmultipath/discovery.c 2010/05/25 23:23:07 1.28.2.8 +++ multipath-tools/libmultipath/discovery.c 2010/05/28 04:53:25 1.28.2.9 @@ -552,7 +552,7 @@ } if (0 <= readattr(attr_path, attr_buff) && strlen(attr_buff) > 0) strncpy(curpath->tgt_node_name, attr_buff, - strlen(attr_buff) - 1); + NODE_NAME_SIZE - 1); else { if(safe_sprintf(attr_path, "%s/class/iscsi_transport/target%i:%i:%i/target_name", @@ -566,8 +566,9 @@ if (0 <= readattr(attr_path, attr_buff) && strlen(attr_buff) > 0) strncpy(curpath->tgt_node_name, attr_buff, - strlen(attr_buff) - 1); + NODE_NAME_SIZE - 1); } + curpath->tgt_node_name[NODE_NAME_SIZE - 1] = '\0'; condlog(3, "tgt_node_name = %s", curpath->tgt_node_name); return 0; --- multipath-tools/libmultipath/structs.h 2009/01/17 00:46:51 1.17.2.9 +++ multipath-tools/libmultipath/structs.h 2010/05/28 04:53:25 1.17.2.10 @@ -5,7 +5,7 @@ #define WWID_SIZE 128 #define SERIAL_SIZE 64 -#define NODE_NAME_SIZE 19 +#define NODE_NAME_SIZE 224 #define PATH_STR_SIZE 16 #define PARAMS_SIZE 1024 #define FILE_NAME_SIZE 256