aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/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
commit431efa59e38af2f69c6a03cf58dec0bd57c78579 (patch)
treeb5bb0880a71f2f80ca0cfbb55bfde9b276a922d9 /usr.sbin/pw/pw_user.c
parent3005821598b70183d210404f97f8017c974f465d (diff)
downloadsrc-431efa59e38af2f69c6a03cf58dec0bd57c78579.tar.gz
src-431efa59e38af2f69c6a03cf58dec0bd57c78579.zip
Fix MAXLOGNAME usage, the code has wrong assumption that
it must be NUL terminated
Notes
Notes: svn path=/head/; revision=23299
Diffstat (limited to 'usr.sbin/pw/pw_user.c')
-rw-r--r--usr.sbin/pw/pw_user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index aeff6bb265aa..faebb3063ea3 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/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);