From: Pavol Rusnak Date: Sun, 7 Dec 2008 07:18:34 +0000 (-0700) Subject: Fix for wrong usage of strncat (thanks Pavol) X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=e4e9cf431159857696067559fab42a911a737eef;p=monky Fix for wrong usage of strncat (thanks Pavol) --- diff --git a/.gitignore b/.gitignore index ebc4657..c912551 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ conky-*.tar.* doc/*.html doc/*.mxml doc/conky.1 +patches/ diff --git a/ChangeLog b/ChangeLog index 1fe1893..841006b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Switching from svn to git repository. The repo can be viewed from http://git.omp.am/?p=conky.git;a=summary and you can clone the repo with: git clone git://git.omp.am/conky.git + * Fix for wrong usage of strncat (thanks Pavol) 2008-12-06 * Removed duplicate sanity check for diskio diff --git a/src/users.c b/src/users.c index d833da7..a684bc1 100644 --- a/src/users.c +++ b/src/users.c @@ -101,7 +101,7 @@ static void user_time(char *ptr) strftime(buf, BUFLEN, "%Mm", dtime); } if (strlen(ptr) + strlen(buf) + 1 <= BUFLEN) { - strncat(ptr, buf, BUFLEN); + strncat(ptr, buf, BUFLEN-strlen(ptr)-1); } } }