Fix MAXLOGNAME usage, the code has wrong assumption that

it must be NUL terminated
This commit is contained in:
Andrey A. Chernov 1997-03-02 21:36:17 +00:00
parent 3005821598
commit 431efa59e3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23299

View file

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