diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-02-17 22:57:31 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-18 11:18:10 -0800 |
| commit | ee2104ea865f8a12eebb382aa502f248e14a5a2d (patch) | |
| tree | cde6b73b7055b23532ab124101ada52a0fa5bf77 /include/linux | |
| parent | cfff3e5c8d2139c38d40d90e3d9fc13721222076 (diff) | |
staging/bcm: integer underflow leads to Oom
We do:
if (NOB > DEFAULT_BUFF_SIZE)
BuffSize = DEFAULT_BUFF_SIZE;
else
BuffSize = NOB;
Since NOB can be negative it results in a larger than intended BuffSize
and makes kzalloc() fail.
The code is still a bit crap because it lets the users read as much as
they want from nvram, but I don't know what a sensible upper limit
should be.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
