<html><body>
<p>Denis:<br>
<br>
I have reviewed the change and agree to it.  Thanks for catching that.<br>
<br>
          Carl Love<br>
<br>
<img width="16" height="16" src="cid:1__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Denis Kirjanov <dkirjanov@hera.kernel.org>">Denis Kirjanov <dkirjanov@hera.kernel.org><br>
<br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:2__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="40%">
<ul>
<ul>
<ul>
<ul><b><font size="2">Denis Kirjanov <dkirjanov@hera.kernel.org></font></b><font size="2"> </font>
<p><font size="2">06/01/2010 12:43 PM</font></ul>
</ul>
</ul>
</ul>
</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">arnd@arndb.de, benh@kernel.crashing.org, paulus@samba.org, jkosina@suse.cz</font></td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">linuxppc-dev@ozlabs.org, oprofile-list@lists.sf.net</font></td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">[PATCH] powerpc/oprofile: fix potential buffer overrun in        op_model_cell.c</font></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img width="1" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:3__=08BBFDA5DFFD66058f9e8a93df938@us.ibm.com" border="0" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt>Fix potential initial_lfsr buffer overrun.<br>
Writing past the end of the buffer could happen when index == ENTRIES<br>
<br>
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org><br>
---<br>
 arch/powerpc/oprofile/op_model_cell.c |    2 +-<br>
 1 files changed, 1 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c<br>
index 2c9e522..7fd90d0 100644<br>
--- a/arch/powerpc/oprofile/op_model_cell.c<br>
+++ b/arch/powerpc/oprofile/op_model_cell.c<br>
@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)<br>
                                 index = ENTRIES-1;<br>
 <br>
                 /* make sure index is valid */<br>
-                if ((index > ENTRIES) || (index < 0))<br>
+                if ((index >= ENTRIES) || (index < 0))<br>
                                 index = ENTRIES-1;<br>
 <br>
                 return initial_lfsr[index];<br>
<br>
------------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
oprofile-list mailing list<br>
oprofile-list@lists.sourceforge.net<br>
</tt><tt><a href="https://lists.sourceforge.net/lists/listinfo/oprofile-list">https://lists.sourceforge.net/lists/listinfo/oprofile-list</a></tt><tt><br>
</tt><br>
</body></html>