From: Christophe CURIS <[email protected]>

(as reported by LLVM / clang)
---
 util/setstyle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/setstyle.c b/util/setstyle.c
index 7f99b6f..80b9e1d 100644
--- a/util/setstyle.c
+++ b/util/setstyle.c
@@ -440,7 +440,7 @@ int main(int argc, char **argv)
                        perror(file);
                        return 1;
                }
-               strncat(buf, "/style", sizeof(buf) - strlen(buf));
+               strncat(buf, "/style", sizeof(buf) - strlen(buf) - 1);
 
                if (stat(buf, &st) != 0 || !S_ISREG(st.st_mode)) {      /* 
maybe symlink too? */
                        printf("%s: %s: style file not found or not a file\n", 
__progname, buf);
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to