<div dir="ltr"><div class="gmail_extra">On Wed, May 8, 2013 at 9:49 AM, Osier Yang <span dir="ltr"><<a href="mailto:jyang@redhat.com" target="_blank">jyang@redhat.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 08/05/13 20:56, John Ferlan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 05/06/2013 08:45 AM, Osier Yang wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Introduced by commit 244ce462e29, which refactored the helper for wwn<br>
reading, however, it forgot to change the old "strndup" and "sizeof(buf)",<br>
"sizeof(buf)" operates on the fixed length array ("buf") in the old code,<br>
but now "buf" is a pointer.<br>
<br>
Before the fix:<br>
<br>
% virsh nodedev-dumpxml scsi_host5<br>
<device><br>
   <name>scsi_host5</name><br>
   <parent>pci_0000_04_00_1</<u></u>parent><br>
   <capability type='scsi_host'><br>
     <host>5</host><br>
     <capability type='fc_host'><br>
       <wwnn>2001001b</wwnn><br>
       <wwpn>2101001b</wwpn><br>
       <fabric_wwn>2001000d</fabric_<u></u>wwn><br>
     </capability><br>
   </capability><br>
</device><br>
<br>
With the fix:<br>
<br>
% virsh nodedev-dumpxml scsi_host5<br>
<device><br>
   <name>scsi_host5</name><br>
   <parent>pci_0000_04_00_1</<u></u>parent><br>
   <capability type='scsi_host'><br>
     <host>5</host><br>
     <capability type='fc_host'><br>
       <wwnn>0x2001001b32a9da4e</<u></u>wwnn><br>
       <wwpn>0x2101001b32a9da4e</<u></u>wwpn><br>
       <fabric_wwn><u></u>0x2001000dec9877c1</fabric_<u></u>wwn><br>
     </capability><br>
   </capability><br>
</device><br>
---<br>
  src/util/virutil.c | 2 +-<br>
  1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
</blockquote>
ACK for technically right; however, since this problem is in 1.0.4 is<br>
there an "effect" where there is a written buffer that has the shorter<br>
(and wrong) wwnn/wwpn that could cause "issues" on the read (and<br>
possible compare) side now??<br>
</blockquote>
<br></div></div>
Yes, fortunately it seems no one used it yet, at least I saw no<br>
bug.<div class="HOEnZb"><div class="h5"><br>
<br></div></div></blockquote><div style>We should put this fix into the -maint branch as well then. </div></div><div><br></div>-- <br>Doug Goldstein
</div></div>