Re: [PATCH]: ACPI: Change the array size from 5 to 8 for acpi_bus_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-05-22 at 03:07 +0800, Matthew Garrett wrote:
> On Thu, May 21, 2009 at 02:26:32PM -0400, Len Brown wrote:
> > what bad things happen if this patch is not applied --
> > do some of those strcpy()'s overflow?
> 
> Looks like there'd be issues with the change to the CPU name on systems 
> with lots of CPUs in ACPI.
What Matthew said is right.

On some boxes I want to change the ACPI processor bus id. And the new
bus id is generated as the following format:
	sprintf(acpi_device_bid(device), "CPU%X", cpu_id)
    
If the CPU number exceeds 255, the string length will exceed the array
size of acpi_bus_id.

Although it doesn't matter, it still looks not very good.  The reason
that it still can work is that the following three bytes are not used.

So I change the array size of acpi_bus_id from 5 to 8.

Thanks.    
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux