<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/05/13 22:56, Doug Goldstein
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAFWqQMQ1PXVVYpsmt-3DPUBRy++kwgFxa3EstKCTDgmEUa+Aow@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">On Wed, May 8, 2013 at 9:49 AM, Osier
          Yang <span dir="ltr"><<a moz-do-not-send="true"
              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</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_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</parent><br>
                         <capability type='scsi_host'><br>
                           <host>5</host><br>
                           <capability type='fc_host'><br>
                             <wwnn>0x2001001b32a9da4e</wwnn><br>
                             <wwpn>0x2101001b32a9da4e</wwpn><br>
                             <fabric_wwn>0x2001000dec9877c1</fabric_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>
        </div>
      </div>
    </blockquote>
    I will, when pushing it. Thanks.<br>
  </body>
</html>