<p>This backport is from linux kernel upstream commit:</p>

<blockquote>
<p>commit 83d6f1f15f8cce844b0a131cbc63e444620e48b5<br>
Author: Arnd Bergmann <a href="mailto:arnd@arndb.de">arnd@arndb.de</a><br>
Date:   Mon Mar 14 15:18:36 2016 +0100</p>

<p>ath9k: fix buffer overrun for ar9287</p>

<p>Code that was added back in 2.6.38 has an obvious overflow<br>
when accessing a static array, and at the time it was added<br>
only a code comment was put in front of it as a reminder<br>
to have it reviewed properly.</p>

<p>This has not happened, but gcc-6 now points to the specific<br>
overflow:</p>

<p>drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs':<br>
drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds]<br>
     maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];<br>
                   ~~~~~~~~~~~~~~~~~~~~~~~<del>^</del></p>

<p>It turns out that the correct array length exists in the local<br>
'intercepts' variable of this function, so we can just use that<br>
instead of hardcoding '4', so this patch changes all three<br>
instances to use that variable. The other two instances were<br>
already correct, but it's more consistent this way.</p>

<p>Signed-off-by: Arnd Bergmann <a href="mailto:arnd@arndb.de">arnd@arndb.de</a><br>
Fixes: 940cd2c12ebf ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs")<br>
Signed-off-by: David S. Miller <a href="mailto:davem@davemloft.net">davem@davemloft.net</a></p>
</blockquote>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/ipxe/ipxe/pull/53'>https://github.com/ipxe/ipxe/pull/53</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>ath9k: fix buffer overrun for ar9287</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/53/files#diff-0">src/drivers/net/ath/ath9k/ath9k_eeprom.c</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/ipxe/ipxe/pull/53.patch'>https://github.com/ipxe/ipxe/pull/53.patch</a></li>
  <li><a href='https://github.com/ipxe/ipxe/pull/53.diff'>https://github.com/ipxe/ipxe/pull/53.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/ipxe/ipxe/pull/53">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AArTVKGKinAiqDrUcbwPGE39W4K1eRe7ks5p_tKugaJpZM4IZ3UB.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/ipxe/ipxe/pull/53"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>