summaryrefslogtreecommitdiff
path: root/utils/zenutils/source/shared/cenc.cpp
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2014-12-20 14:47:09 +0100
committerThomas Jarosch <tomj@simonv.com>2014-12-20 14:47:09 +0100
commit575ec8902e61ea82bbe8639c1f5a29997b88dd8c (patch)
tree09f2932b0f2faaa1cb44acd5436d5ccdbd7fb903 /utils/zenutils/source/shared/cenc.cpp
parentd62e1b3c5ff513fb69e784cbfb59dad1cc67899b (diff)
downloadrockbox-575ec8902e61ea82bbe8639c1f5a29997b88dd8c.zip
rockbox-575ec8902e61ea82bbe8639c1f5a29997b88dd8c.tar.gz
rockbox-575ec8902e61ea82bbe8639c1f5a29997b88dd8c.tar.bz2
rockbox-575ec8902e61ea82bbe8639c1f5a29997b88dd8c.tar.xz
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
Diffstat (limited to 'utils/zenutils/source/shared/cenc.cpp')
0 files changed, 0 insertions, 0 deletions