avoid a potential buffer truncation.

This commit is contained in:
mrg 2019-02-04 08:07:33 +00:00
parent c13282f0fd
commit e79f0588d7
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stat.c,v 1.43 2017/09/21 22:53:19 kre Exp $ */
/* $NetBSD: stat.c,v 1.44 2019/02/04 08:07:33 mrg Exp $ */
/*
* Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: stat.c,v 1.43 2017/09/21 22:53:19 kre Exp $");
__RCSID("$NetBSD: stat.c,v 1.44 2019/02/04 08:07:33 mrg Exp $");
#endif
#if ! HAVE_NBTOOL_CONFIG_H
@ -646,7 +646,7 @@ format1(const struct stat *st,
uint64_t data;
char *stmp, lfmt[24], tmp[20];
const char *sdata;
char smode[12], sid[12], path[PATH_MAX + 4], visbuf[PATH_MAX * 4 + 4];
char smode[12], sid[13], path[PATH_MAX + 4], visbuf[PATH_MAX * 4 + 4];
struct passwd *pw;
struct group *gr;
time_t secs;