use snprintf for string handling in batget

CID 1039801
This commit is contained in:
Mike Blumenkrantz 2016-03-22 12:06:27 -04:00
parent 41f98b96bb
commit 403e86d67c
1 changed files with 1 additions and 2 deletions

View File

@ -1025,8 +1025,7 @@ linux_acpi_init(void)
char buf[PATH_MAX + 6];
FILE *f;
strcpy(buf, info->path);
strcat(buf, "/info");
snprintf(buf, sizeof(buf), "%s/info", info->path);
f = fopen(buf, "r");
if (f)
{