diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-03-02 12:25:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-03-02 12:25:53 +0000 |
commit | 662140123edcb315364aafe92a5f69a524b8e656 (patch) | |
tree | 93e7b4a508562a9a9d8ca5dabbb104c9d5d89297 | |
parent | d7ac0d7978739b80c4ff29e425e864b051a7b407 (diff) |
Explicitly leave room for the NUL byte in {wday,mon}_name; Francois Perrad
-rw-r--r-- | lib/libc/time/asctime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/time/asctime.c b/lib/libc/time/asctime.c index c691da59499..312727c05eb 100644 --- a/lib/libc/time/asctime.c +++ b/lib/libc/time/asctime.c @@ -5,7 +5,7 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)asctime.c 7.22"; -static char rcsid[] = "$OpenBSD: asctime.c,v 1.9 2004/10/28 19:44:11 dhartmei Exp $"; +static char rcsid[] = "$OpenBSD: asctime.c,v 1.10 2005/03/02 12:25:52 millert Exp $"; #endif /* LIBC_SCCS and not lint */ /*LINTLIBRARY*/ @@ -60,10 +60,10 @@ register const struct tm * timeptr; char * buf; int bufsize; { - static const char wday_name[][3] = { + static const char wday_name[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; - static const char mon_name[][3] = { + static const char mon_name[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; |