<?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 static analysis: buffer overflow in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928842#M87275</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;The following error is generated by&amp;nbsp;a static analysis of my application:&lt;/P&gt;

&lt;P&gt;error #12048: buffer overflow: array index of &amp;amp;quot;DESIND&amp;amp;quot; is outside the bounds; array &amp;amp;quot;DESIND&amp;amp;quot; of size (1:5) is indexed by value 0&lt;/P&gt;

&lt;P&gt;This error refers to the following file where DESIND is declared as:&lt;/P&gt;

&lt;P&gt;CHARACTER*6 &amp;nbsp;DESIND&lt;/P&gt;

&lt;P&gt;and the offending line is:&lt;/P&gt;

&lt;P&gt;DESIND ='IALFA'&lt;/P&gt;

&lt;P&gt;Is this really a buffer overflow? &amp;nbsp;If so, how so?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Jim&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2013 02:04:22 GMT</pubDate>
    <dc:creator>bealeja</dc:creator>
    <dc:date>2013-12-05T02:04:22Z</dc:date>
    <item>
      <title>static analysis: buffer overflow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928842#M87275</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;The following error is generated by&amp;nbsp;a static analysis of my application:&lt;/P&gt;

&lt;P&gt;error #12048: buffer overflow: array index of &amp;amp;quot;DESIND&amp;amp;quot; is outside the bounds; array &amp;amp;quot;DESIND&amp;amp;quot; of size (1:5) is indexed by value 0&lt;/P&gt;

&lt;P&gt;This error refers to the following file where DESIND is declared as:&lt;/P&gt;

&lt;P&gt;CHARACTER*6 &amp;nbsp;DESIND&lt;/P&gt;

&lt;P&gt;and the offending line is:&lt;/P&gt;

&lt;P&gt;DESIND ='IALFA'&lt;/P&gt;

&lt;P&gt;Is this really a buffer overflow? &amp;nbsp;If so, how so?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 02:04:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928842#M87275</guid>
      <dc:creator>bealeja</dc:creator>
      <dc:date>2013-12-05T02:04:22Z</dc:date>
    </item>
    <item>
      <title>Would you please show a small</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928843#M87276</link>
      <description>&lt;P&gt;Would you please show a small but complete program that demonstrates this message? I'm unable to reproduce it based on your description.&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 18:31:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928843#M87276</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-05T18:31:59Z</dc:date>
    </item>
    <item>
      <title>Hi Steve!</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928844#M87277</link>
      <description>&lt;P&gt;Hi Steve!&lt;/P&gt;

&lt;P&gt;The program is very simple:&lt;/P&gt;

&lt;P&gt;PROGRAM CONSOLE1&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;CHARACTER*6 DESIND&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;DESIND = '123456'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;DESIND = '12345'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;DESIND = '1234'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	END PROGRAM&lt;/P&gt;

&lt;P&gt;The command line is as follow:&lt;/P&gt;

&lt;P&gt;/nologo /debug:full /Od /Qdiag-enable:sc2 /Qdiag-enable:sc-full /Qdiag-enable:sc-include /Qdiag-enable:sc-single-file /warn:interfaces /module:"Debug\\" /object:"Debug\\" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c&lt;/P&gt;

&lt;P&gt;and the static analysis output (if you can find the pdr file!) contains,&lt;/P&gt;

&lt;P&gt;Main.f90(6): error #12048: buffer overflow: array index of &amp;amp;quot;DESIND&amp;amp;quot; is outside the bounds; array &amp;amp;quot;DESIND&amp;amp;quot; of size (1:5) is indexed by value 0&lt;/P&gt;

&lt;P&gt;I played around with it a little bit. &amp;nbsp;The above seems to be the simplest case that generates the error message. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;It is weird! &amp;nbsp;I don't understand it at all.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 02:11:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928844#M87277</guid>
      <dc:creator>bealeja</dc:creator>
      <dc:date>2013-12-06T02:11:20Z</dc:date>
    </item>
    <item>
      <title>It's a bug - I will report it</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928845#M87278</link>
      <description>&lt;P&gt;It's a bug - I will report it.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 16:37:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/static-analysis-buffer-overflow/m-p/928845#M87278</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-06T16:37:06Z</dc:date>
    </item>
  </channel>
</rss>

