Re: [E-devel] [e] Patch acpi

2012-12-15 Thread The Rasterman
On Sat, 15 Dec 2012 13:03:10 +0100 Maxime Villard said: > A little patch to fix a possible warning - and overflow. > > 'buf' is PATH_MAX, but PATH_MAX is not necessary 1024. If > PATH_MAX < 1024 -> overflow. > > Also, fgets() fills the buffer and nullterminate it, so we > don't need to buff[0]

[E-devel] [e] Patch acpi

2012-12-15 Thread Maxime Villard
A little patch to fix a possible warning - and overflow. 'buf' is PATH_MAX, but PATH_MAX is not necessary 1024. If PATH_MAX < 1024 -> overflow. Also, fgets() fills the buffer and nullterminate it, so we don't need to buff[0] = '\0'. --- e_acpi.c 2012-12-15 12:54:15.107749981 +0100 +++ e_acpi.c 20