dect
/
linux-2.6
Archived
13
0
Fork 0

[ACPI] Fix Null pointer deref in video/lcd/brightness

http://bugzilla.kernel.org/show_bug.cgi?id=5571

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Yu Luming <luming.yu@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Thomas Renninger 2005-11-08 05:27:00 -05:00 committed by Len Brown
parent d2149b5423
commit 59d399d357
1 changed files with 1 additions and 1 deletions

View File

@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file,
ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
if (!dev || count + 1 > sizeof str)
if (!dev || !dev->brightness || count + 1 > sizeof str)
return_VALUE(-EINVAL);
if (copy_from_user(str, buffer, count))