Skip to content
Browse files

parse_acpi_args: respect BUFFER_SIZE, do not hardcode it

Replaced the hardcoded size for the arguments list by 2 * BUFFER_SIZE. Twice
because the method has a maximum length of BUFFER_SIZE. The arguments list is
not limited by BUFFER_SIZE, but let's assume that the arguments list does not
grow over BUFFER_SIZE.
  • Loading branch information...
1 parent 6b2c68c commit b7c4e670dbbee7e2e509b9bd334867f77333bd76 @Lekensteyn Lekensteyn committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 acpi_call.c
View
2 acpi_call.c
@@ -205,7 +205,7 @@ static char *parse_acpi_args(char *input, int *nargs, union acpi_object **args)
static int acpi_proc_write( struct file *filp, const char __user *buff,
unsigned long len, void *data )
{
- char input[512] = { '\0' };
+ char input[2 * BUFFER_SIZE] = { '\0' };
union acpi_object *args;
int nargs, i;
char *method;

0 comments on commit b7c4e67

Please sign in to comment.
Something went wrong with that request. Please try again.