<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    FYI,<br>
    <br>
    <div class="moz-forward-container">To fix these Coverity issues ,
      please check the below link for guidelines:<br>
      <a class="moz-txt-link-freetext"
href="http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity">http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity</a><br>
      <br>
      Thanks,<br>
      Lala<br>
      <br>
      -------- Original Message --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
            </th>
            <td>New Defects reported by Coverity Scan for GlusterFS</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
            <td>Wed, 11 Jun 2014 06:36:17 -0700</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:scan-admin@coverity.com">scan-admin@coverity.com</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>Hi,


Please find the latest report on new defect(s) introduced to GlusterFS found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1222523:  Copy into fixed size buffer  (STRING_OVERFLOW)
/xlators/mgmt/glusterd/src/glusterd-utils.c: 3728 in gd_import_new_brick_snap_details()
/xlators/mgmt/glusterd/src/glusterd-utils.c: 3737 in gd_import_new_brick_snap_details()

** CID 1222524:  Structurally dead code  (UNREACHABLE)
/cli/src/cli-rpc-ops.c: 8796 in gf_cli_snapshot_for_status()


________________________________________________________________________________________________________
*** CID 1222523:  Copy into fixed size buffer  (STRING_OVERFLOW)
/xlators/mgmt/glusterd/src/glusterd-utils.c: 3728 in gd_import_new_brick_snap_details()
3722             snprintf (key, sizeof (key), "%s.device_path", prefix);
3723             ret = dict_get_str (dict, key, &amp;snap_device);
3724             if (ret) {
3725                     gf_log (this-&gt;name, GF_LOG_ERROR, "%s missing in payload", key);
3726                     goto out;
3727             }
&gt;&gt;&gt;     CID 1222523:  Copy into fixed size buffer  (STRING_OVERFLOW)
&gt;&gt;&gt;     You might overrun the 4096 byte fixed-size string "brickinfo-&gt;device_path" by copying "snap_device" without checking the length.
3728             strcpy (brickinfo-&gt;device_path, snap_device);
3729     
3730             memset (key, 0, sizeof (key));
3731             snprintf (key, sizeof (key), "%s.mount_dir", prefix);
3732             ret = dict_get_str (dict, key, &amp;mount_dir);
3733             if (ret) {
/xlators/mgmt/glusterd/src/glusterd-utils.c: 3737 in gd_import_new_brick_snap_details()
3731             snprintf (key, sizeof (key), "%s.mount_dir", prefix);
3732             ret = dict_get_str (dict, key, &amp;mount_dir);
3733             if (ret) {
3734                     gf_log (this-&gt;name, GF_LOG_ERROR, "%s missing in payload", key);
3735                     goto out;
3736             }
&gt;&gt;&gt;     CID 1222523:  Copy into fixed size buffer  (STRING_OVERFLOW)
&gt;&gt;&gt;     You might overrun the 4096 byte fixed-size string "brickinfo-&gt;mount_dir" by copying "mount_dir" without checking the length.
3737             strcpy (brickinfo-&gt;mount_dir, mount_dir);
3738     
3739     out:
3740             return ret;
3741     }
3742     

________________________________________________________________________________________________________
*** CID 1222524:  Structurally dead code  (UNREACHABLE)
/cli/src/cli-rpc-ops.c: 8796 in gf_cli_snapshot_for_status()
8790                             dict_unref (snap_dict);
8791                     }
8792             }
8793     out:
8794             return ret;
8795     
&gt;&gt;&gt;     CID 1222524:  Structurally dead code  (UNREACHABLE)
&gt;&gt;&gt;     This code cannot be reached: "if (ret &amp;&amp; snap_dict)
  dic...".
8796             if (ret &amp;&amp; snap_dict)
8797                     dict_unref (snap_dict);
8798     }
8799     
8800     int32_t
8801     gf_cli_snapshot (call_frame_t *frame, xlator_t *this,


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, <a class="moz-txt-link-freetext" href="http://scan.coverity.com/projects/987?tab=overview">http://scan.coverity.com/projects/987?tab=overview</a>

To unsubscribe from the email notification for new defects, <a class="moz-txt-link-freetext" href="http://scan5.coverity.com/cgi-bin/unsubscribe.py">http://scan5.coverity.com/cgi-bin/unsubscribe.py</a>



</pre>
      <br>
    </div>
    <br>
  </body>
</html>