diff options
author | Denis Kirjanov <dkirjanov@hera.kernel.org> | 2010-06-01 15:43:34 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-06-07 11:18:56 +0200 |
commit | 238c1a78c957f3dc7cb848b161dcf4805793ed56 (patch) | |
tree | 4808d597025d5eceec474deab9741038aa52ca2e /arch/powerpc/oprofile | |
parent | 58cc1a9e3b11a84e66c4d3a4cc9073f2cb0ecabb (diff) | |
download | kernel_goldelico_gta04-238c1a78c957f3dc7cb848b161dcf4805793ed56.zip kernel_goldelico_gta04-238c1a78c957f3dc7cb848b161dcf4805793ed56.tar.gz kernel_goldelico_gta04-238c1a78c957f3dc7cb848b161dcf4805793ed56.tar.bz2 |
powerpc/oprofile: fix potential buffer overrun in op_model_cell.c
Fix potential initial_lfsr buffer overrun.
Writing past the end of the buffer could happen when index == ENTRIES
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/powerpc/oprofile')
-rw-r--r-- | arch/powerpc/oprofile/op_model_cell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index 2c9e522..7fd90d0 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c @@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n) index = ENTRIES-1; /* make sure index is valid */ - if ((index > ENTRIES) || (index < 0)) + if ((index >= ENTRIES) || (index < 0)) index = ENTRIES-1; return initial_lfsr[index]; |