rockbox/firmware/target/arm/s3c2440
Thomas Jarosch 575ec8902e mini2440: Fix bogus buffer access in LCD backlight driver
The backlight driver always writes a bogus value
from memory into the LCD brightness register.

Fix it up by adding bounds checks and
use a more sane default value.

While looking at the code, I noticed
that BACKLIGHT_CONTROL_SET probably ignores
the desired brightness level, too.

Note: Please test on real hardware, I don't own it.

cppcheck reported:
[rockbox/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c:53]: (error) Array 'log_brightness[13]' accessed at index 255, which is out of bounds.

Change-Id: Iaafa929a8adaa97b93ebcb66e1f6bd3bf0dad84e
2014-12-20 14:47:09 +01:00
..
gigabeat-fx Revise the PCM callback system after adding multichannel audio. 2012-03-03 07:23:38 +01:00
mini2440 mini2440: Fix bogus buffer access in LCD backlight driver 2014-12-20 14:47:09 +01:00
adc-s3c2440.c Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. 2010-06-30 02:02:46 +00:00
app.lds Add KEEP() around vectors in linker scripts. 2011-12-18 06:43:08 +00:00
boot.lds Add KEEP() around vectors in linker scripts. 2011-12-18 06:43:08 +00:00
crt0.S arm: factor all exception handlers out of the crt0.S files 2012-04-06 13:46:32 +02:00
debug-s3c2440.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
dma-s3c2440.c fix cache function name 2012-03-19 08:42:53 +01:00
dma-target.h Working Bootloader for mini2440. 2009-10-22 17:45:02 +00:00
i2c-s3c2440.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
i2c-s3c2440.h Many more drivers for mini2440. Now the main binary compiles and runs. 2009-10-26 18:16:58 +00:00
kernel-s3c2440.c Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. 2010-06-30 02:02:46 +00:00
lcd-s3c2440.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
sd-s3c2440.c Rewrite filesystem code (WIP) 2014-08-30 03:48:23 +02:00
system-s3c2440.c Introduce USED_ATTR wrapper for __attribute__((used)). 2011-12-09 15:33:59 +00:00
system-target.h Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. 2010-06-30 02:02:46 +00:00
uart-s3c2440.c Various minor cleanups for mini2440 2010-08-01 08:56:15 +00:00
uart-s3c2440.h Many more drivers for mini2440. Now the main binary compiles and runs. 2009-10-26 18:16:58 +00:00