Skip to content

Commit

Permalink
ACPI: Video: Increase buffer size for writes to brightness proc file.
Browse files Browse the repository at this point in the history
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 <dannybaumann@web.de>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Danny Baumann authored and Len Brown committed Nov 19, 2007
1 parent a4f0c27 commit c88c578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c88c578

Please sign in to comment.