# $Id$
+2008-06-16
+ * Fixed 3 bufferoverflows in a struct utmp in users.c
+
2008-06-08
* Bugfix, $memgraph wasn't working and needed docs
* Bugfix, $execgraph showed 0-0 instead of 0-100 values
setutent();
while ((usr = getutent()) != NULL) {
if (usr->ut_type == USER_PROCESS) {
- //TODO change the magic number 9 into a constant, does anybody know where it comes from ?
- if (strlen(ptr) + (strlen(usr->ut_name) > 9 ? 9 : strlen(usr->ut_name) ) + 1 <= BUFLEN) {
- strncat(ptr, usr->ut_name, 9);
+ if (strlen(ptr) + strlen(usr->ut_name) + 1 <= BUFLEN) {
+ strncat(ptr, usr->ut_name, UT_NAMESIZE);
}
}
}
setutent();
while ((usr = getutent()) != NULL) {
if (usr->ut_type == USER_PROCESS) {
- //TODO change the magic number 13 into a constant, does anybody know where it comes from ?
- if (strlen(ptr) + (strlen(usr->ut_line) > 13 ? 13 : strlen(usr->ut_line) ) + 1 <= BUFLEN) {
- strncat(ptr, usr->ut_line, 13);
+ if (strlen(ptr) + strlen(usr->ut_line) + 1 <= BUFLEN) {
+ strncat(ptr, usr->ut_line, UT_LINESIZE);
}
}
}