1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-06-02 07:20:47 +00:00

Fix for wrong usage of strncat (thanks Pavol)

This commit is contained in:
Pavol Rusnak 2008-12-07 00:18:34 -07:00 committed by Brenden Matthews
parent f7281c192a
commit e4e9cf4311
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -24,3 +24,4 @@ conky-*.tar.*
doc/*.html
doc/*.mxml
doc/conky.1
patches/

View File

@ -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

View File

@ -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);
}
}
}