diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-03-22 12:06:27 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-03-22 12:06:27 -0400 |
commit | 403e86d67c76aae0a173083ddd8e84fa1b30b2c9 (patch) | |
tree | b1aa63ceb3d84c2b12f08fa57b93baf5973f82bf | |
parent | 41f98b96bb368551642141a6f9cf0f82ddecf7d5 (diff) | |
download | enlightenment-403e86d67c76aae0a173083ddd8e84fa1b30b2c9.tar.gz |
use snprintf for string handling in batget
CID 1039801
-rw-r--r-- | src/modules/battery/batget.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/battery/batget.c b/src/modules/battery/batget.c index fa183a55be..f6abd07788 100644 --- a/src/modules/battery/batget.c +++ b/src/modules/battery/batget.c @@ -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) { |