discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=403e86d67c76aae0a173083ddd8e84fa1b30b2c9

commit 403e86d67c76aae0a173083ddd8e84fa1b30b2c9
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Mar 22 12:06:27 2016 -0400

    use snprintf for string handling in batget
    
    CID 1039801
---
 src/modules/battery/batget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/modules/battery/batget.c b/src/modules/battery/batget.c
index fa183a5..f6abd07 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)
                {

-- 


Reply via email to