From 9cc8fce39349f57d0ecea519e69e6e1ed5f1927f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 26 May 2002 00:21:41 +0000 Subject: oops, major oops; moritz@jodeit.org --- lib/libc/time/strftime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc/time') diff --git a/lib/libc/time/strftime.c b/lib/libc/time/strftime.c index ea0059a360f..281c8e482fc 100644 --- a/lib/libc/time/strftime.c +++ b/lib/libc/time/strftime.c @@ -1,6 +1,6 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)strftime.c 7.64"; -static char *rcsid = "$OpenBSD: strftime.c,v 1.9 2002/05/25 09:11:02 deraadt Exp $"; +static char *rcsid = "$OpenBSD: strftime.c,v 1.10 2002/05/26 00:21:40 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include "private.h" @@ -648,7 +648,8 @@ _loc P((void)) ((sizeof locale_home) + namesize + (sizeof lc_time))) goto no_locale; oldsun = 0; - (void) snprintf(filename, "%s/%s/%s", locale_home, name, lc_time); + (void) snprintf(filename, sizeof filename, "%s/%s/%s", locale_home, + name, lc_time); fd = open(filename, O_RDONLY); if (fd < 0) { /* -- cgit v1.2.3