summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1997-03-02 21:36:17 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1997-03-02 21:36:17 +0000
commitfe4c2973db9adb7c66b5852e36b172739d5b9b79 (patch)
tree739b5db4ca3d1bcdb3fb2a45bb9420c80648b99d /pw/pw_user.c
parent85467b8ff30cfdfa7886405262604e8c9448a910 (diff)
downloadpw-darwin-fe4c2973db9adb7c66b5852e36b172739d5b9b79.tar.gz
pw-darwin-fe4c2973db9adb7c66b5852e36b172739d5b9b79.tar.zst
pw-darwin-fe4c2973db9adb7c66b5852e36b172739d5b9b79.zip
Fix MAXLOGNAME usage, the code has wrong assumption that
it must be NUL terminated
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r--pw/pw_user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index aeff6bb..faebb30 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: pw_user.c,v 1.15 1997/02/22 16:12:30 peter Exp $
*/
#include <unistd.h>
@@ -44,10 +44,10 @@
#include "bitmap.h"
#include "pwupd.h"
-#if (MAXLOGNAME-1) > UT_NAMESIZE
+#if MAXLOGNAME > UT_NAMESIZE
#define LOGNAMESIZE UT_NAMESIZE
#else
-#define LOGNAMESIZE (MAXLOGNAME-1)
+#define LOGNAMESIZE MAXLOGNAME
#endif
static int print_user(struct passwd * pwd, int pretty);