lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] power_meter: acpi_device_class "power_meter_resource" too long
On Fri, Mar 19, 2010 at 02:49:20PM +0300, Dan Carpenter wrote:
> acpi_device_class can only be 19 characters and a NULL terminator.
>
> The current code has a buffer overflow in acpi_power_meter_add():
> strcpy(acpi_device_class(device), ACPI_POWER_METER_CLASS);
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Feel free to change the name to anything you like.

How hard would it be to increase the size of that buffer?

(Or, is there a need to have "_resource" in that string at all?)

--D


\
 
 \ /
  Last update: 2010-03-22 19:15    [W:0.049 / U:1.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site