@@ -550,6 +550,7 @@ my_am_cflags="\
-Werror=strict-prototypes \
-Werror=missing-prototypes \
-Werror=missing-declarations \
+ -Werror=format-overflow=2 \
"
AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
@@ -212,7 +212,7 @@ cache_flush(int force)
{
struct stat stb;
int c;
- char stime[20];
+ char stime[32];
char path[200];
time_t now;
/* Note: the order of these caches is important.
@@ -169,7 +169,7 @@ static int
flush_nfsd_cache(char *path, time_t now)
{
int fd;
- char stime[20];
+ char stime[32];
sprintf(stime, "%ld\n", now);
fd = open(path, O_RDWR);
Added the -Werror=format-overflow=2 warning flag and then cleaned up the mess Signed-off-by: Steve Dickson <steved@redhat.com> --- configure.ac | 1 + support/nfs/cacheio.c | 2 +- utils/idmapd/idmapd.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)