]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] prng: fix pointer arithmetic
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 27 Apr 2011 07:34:33 +0000 (09:34 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 27 Apr 2011 07:34:45 +0000 (09:34 +0200)
commitf913c26a4c7458986f9cde1ece40a76b6ff795d9
tree8d3b2cf0b718879b802fc28f4eac9f3020fc3d1c
parentd8ac14e0afa40bea8504e0817611b1680421dd34
[S390] prng: fix pointer arithmetic

The git commit c0b044c70866572d10adc628055ae01a1dce3853 fixed the
access beyond the end of the stack in prng_seed but the pointer
arithmetic is still incorrect. The calculation has been off by
a factor of 64, now it is only off by a factor of 8. prng_seed
is called with a maximum of 16 for nbytes, small enough that
the incorrect calculation stays insides the limits of the stack.
Place parentheses for correct pointer arithmetic.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/prng.c