<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HPE Fortify security scans flags possible resource leak in tDBOutput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/HPE-Fortify-security-scans-flags-possible-resource-leak-in/m-p/2340243#M108290</link>
    <description>&lt;P&gt;This also raises alerts where the code emits pstmt_tOracleOutput_1.executeQuery() and tDBOuput_1.PreparedStatement(...)&lt;/P&gt;</description>
    <pubDate>Sat, 07 Jul 2018 00:34:23 GMT</pubDate>
    <dc:creator>pgruenbeck</dc:creator>
    <dc:date>2018-07-07T00:34:23Z</dc:date>
    <item>
      <title>HPE Fortify security scans flags possible resource leak in tDBOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/HPE-Fortify-security-scans-flags-possible-resource-leak-in/m-p/2340242#M108289</link>
      <description>&lt;P&gt;The following code may have a resource leak in the main path or if an exception occurs in code emitted by the tDBOutput component.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;if(!whetherExist_tDBOutput_1) {
	java.sql.Statement stmtCreate_tDBOutput_1 = conn_tDBOutput_1.createStatement();
		stmtCreate_tDBOutput_1.execute("CREATE TABLE " + tableName_tDBOutput_1 + "(ID VARCHAR2(32)  )");
	stmtCreate_tDBOutput_1.close();
}&lt;/PRE&gt; 
&lt;P&gt;Example: Under normal conditions, the following code executes a database query, processes the results&lt;BR /&gt;returned by the database, and closes the allocated statement object. But if an exception occurs while&lt;BR /&gt;executing the SQL or processing the results, the statement object will not be closed. If this happens often&lt;BR /&gt;enough, the database will run out of available cursors and not be able to execute any more SQL queries.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Statement stmt = conn.createStatement();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ResultSet rs = stmt.executeQuery(CXN_SQL);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; harvestResults(rs);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; stmt.close();&lt;BR /&gt;In this case, there are program paths on which a Statement is not released.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 00:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/HPE-Fortify-security-scans-flags-possible-resource-leak-in/m-p/2340242#M108289</guid>
      <dc:creator>pgruenbeck</dc:creator>
      <dc:date>2018-07-07T00:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: HPE Fortify security scans flags possible resource leak in tDBOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/HPE-Fortify-security-scans-flags-possible-resource-leak-in/m-p/2340243#M108290</link>
      <description>&lt;P&gt;This also raises alerts where the code emits pstmt_tOracleOutput_1.executeQuery() and tDBOuput_1.PreparedStatement(...)&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 00:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/HPE-Fortify-security-scans-flags-possible-resource-leak-in/m-p/2340243#M108290</guid>
      <dc:creator>pgruenbeck</dc:creator>
      <dc:date>2018-07-07T00:34:23Z</dc:date>
    </item>
  </channel>
</rss>

