Blob Blame History Raw
--- chkutmp.c~	2006-10-18 13:00:29.000000000 -0500
+++ chkutmp.c	2009-07-21 14:42:41.000000000 -0500
@@ -83 +83 @@
-    struct ps_line *endp = &psl_p[MAXBUF];
+    struct ps_line *endp = &psl_p[MAXBUF-1];
@@ -135 +135 @@
-    struct utmp_line *endp = &utl_p[MAXBUF];
+    struct utmp_line *endp = &utl_p[MAXBUF-1];
--- chkutmp.c~	2009-07-22 07:57:13.000000000 -0500
+++ chkutmp.c	2009-07-22 08:09:41.000000000 -0500
@@ -179 +179 @@
-    for (h = 0; h <= y; h++) {	/* loop through 'ps' data */
+    for (h = 0; h < y; h++) {	/* loop through 'ps' data */
@@ -181 +181 @@
-	for (i = 0; i <= z; i++) {	/* try and match the tty from 'ps' to one in utmp */
+	for (i = 0; i < z; i++) {	/* try and match the tty from 'ps' to one in utmp */
--- chkutmp.c~	2009-07-22 08:09:41.000000000 -0500
+++ chkutmp.c	2009-07-22 08:11:17.000000000 -0500
@@ -60,3 +60,3 @@
-    char ps_tty[UT_LINESIZE];
-    char ps_user[UT_NAMESIZE];
-    char ps_args[MAXLENGTH];
+    char ps_tty[UT_LINESIZE+2];
+    char ps_user[UT_NAMESIZE+2];
+    char ps_args[MAXLENGTH+2];
@@ -66 +66 @@
-    char ut_tty[UT_LINESIZE];
+    char ut_tty[UT_LINESIZE+2];