forked from enlightenment/enlightenment
ensure path length fits in buffer in batget
SVN revision: 80844
This commit is contained in:
parent
41236712d9
commit
0774c6bf65
|
@ -996,6 +996,7 @@ linux_acpi_init(void)
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
|
if (info->name_length + sizeof("/state") >= sizeof(buf)) continue;
|
||||||
strcpy(buf, info->path);
|
strcpy(buf, info->path);
|
||||||
strcat(buf, "/state");
|
strcat(buf, "/state");
|
||||||
f = fopen(buf, "r");
|
f = fopen(buf, "r");
|
||||||
|
|
Loading…
Reference in New Issue