forked from enlightenment/enlightenment
From: Maxime Villard <rustyBSD@gmx.fr>
Subject: [E-devel] [e] Patch acpi 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'. SVN revision: 81024
This commit is contained in:
parent
534ae45303
commit
5ebf793f1b
|
@ -345,8 +345,7 @@ _e_acpi_lid_status_get(const char *device, const char *bus)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the line from state file */
|
/* read the line from state file */
|
||||||
buff[0] = '\0';
|
ret = fgets(buff, sizeof(buff), f);
|
||||||
ret = fgets(buff, 1024, f);
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
/* parse out state file */
|
/* parse out state file */
|
||||||
|
|
Loading…
Reference in New Issue