englebass pushed a commit to branch master.

commit 7d1703ea0dd7e5eb2eedb78f1a9f5f008907c41c
Author: Sebastian Dransfeld <[email protected]>
Date:   Wed Aug 7 10:52:02 2013 +0200

    efreet: Be paranoid about '\0' termination
    
    CID: #1039722
---
 src/lib/efreet/efreet_mime.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c
index 9dcec05..7232176 100644
--- a/src/lib/efreet/efreet_mime.c
+++ b/src/lib/efreet/efreet_mime.c
@@ -704,9 +704,11 @@ efreet_mime_special_check(const char *file)
                char path[PATH_MAX];
 
                strncpy(path, file, PATH_MAX);
+               path[PATH_MAX - 1] = '\0';
 
                path_len = strlen(file);
                strncpy(parent, path, PATH_MAX);
+               parent[PATH_MAX - 1] = '\0';
 
                /* Kill any trailing slash */
                parent[--path_len] = '\0';

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk

Reply via email to