ram_console: Fix crash on some buffer size values.
commit9906274aee6138cb956634a0dc3d51bdaaabaeb7
authorArve Hjønnevåg <arve@android.com>
Fri, 20 Jun 2008 01:54:43 +0000 (19 18:54 -0700)
committerBrian Swetland <swetland@google.com>
Fri, 4 Jul 2008 16:01:59 +0000 (4 09:01 -0700)
tree7d94a91c23ac1e4255cf1ab34e213facefea27f7
parent94bfa20cd1b5fab95cbbe5f2a7218dd27baa4404
ram_console: Fix crash on some buffer size values.

If old buffer size is too large to fit before the ecc data but small
enough to fit without any ecc data, the ecc correction would crash
trying to correct a negative size block at the end.
This buffer is now rejected.

Signed-off-by: Brian Swetland <swetland@google.com>
drivers/android/ram_console.c