From: Danny Baumann Date: Fri, 2 Nov 2007 12:47:53 +0000 (+0100) Subject: ACPI: Video: Increase buffer size for writes to brightness proc file. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c88c5786d3df51ccfa4e2d111fc9c8fc0f5b2797;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ACPI: Video: Increase buffer size for writes to brightness proc file. In order to be able to write the value "100" to /proc/acpi/video/.../brightness, we have to allocate 5 bytes: 4 characters will be written (1, 0, 0 plus null byte), and 1 byte should be buffer for a terminating NULL character. http://bugzilla.kernel.org/show_bug.cgi?id=9278 Signed-off-by: Danny Baumann Acked-by: Zhang Rui Signed-off-by: Len Brown --- diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index dce0a6e47f5a..44a0d9ba9bd6 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -897,7 +897,7 @@ acpi_video_device_write_brightness(struct file *file, { struct seq_file *m = file->private_data; struct acpi_video_device *dev = m->private; - char str[4] = { 0 }; + char str[5] = { 0 }; unsigned int level = 0; int i;