mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-25 03:05:08 +00:00
Fix MAXLOGNAME usage, the code has wrong assumption that
it must be NUL terminated
This commit is contained in:
parent
3005821598
commit
431efa59e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23299
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue