|
9 | 9 | * |
10 | 10 | * |
11 | 11 | * IDENTIFICATION |
12 | | - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.101 2002/11/1200:39:08 tgl Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.102 2002/12/1219:16:55 tgl Exp $ |
13 | 13 | * |
14 | 14 | * NOTES |
15 | 15 | * |
@@ -130,14 +130,14 @@ GetCurrentAbsoluteTime(void) |
130 | 130 | * XXX FreeBSD man pages indicate that this should work - thomas |
131 | 131 | * 1998-12-12 |
132 | 132 | */ |
133 | | -strcpy(CTZName,tm->tm_zone); |
| 133 | +StrNCpy(CTZName,tm->tm_zone,MAXTZLEN+1); |
134 | 134 |
|
135 | 135 | #elif defined(HAVE_INT_TIMEZONE) |
136 | 136 | tm=localtime(&now); |
137 | 137 |
|
138 | 138 | CDayLight=tm->tm_isdst; |
139 | 139 | CTimeZone= ((tm->tm_isdst>0) ? (TIMEZONE_GLOBAL-3600) :TIMEZONE_GLOBAL); |
140 | | -strcpy(CTZName,tzname[tm->tm_isdst]); |
| 140 | +StrNCpy(CTZName,tzname[tm->tm_isdst],MAXTZLEN+1); |
141 | 141 | #else/* neither HAVE_TM_ZONE nor |
142 | 142 | * HAVE_INT_TIMEZONE */ |
143 | 143 | CTimeZone=tb.timezone*60; |
@@ -212,14 +212,14 @@ GetCurrentAbsoluteTimeUsec(int *usec) |
212 | 212 | * XXX FreeBSD man pages indicate that this should work - thomas |
213 | 213 | * 1998-12-12 |
214 | 214 | */ |
215 | | -strcpy(CTZName,tm->tm_zone); |
| 215 | +StrNCpy(CTZName,tm->tm_zone,MAXTZLEN+1); |
216 | 216 |
|
217 | 217 | #elif defined(HAVE_INT_TIMEZONE) |
218 | 218 | tm=localtime(&now); |
219 | 219 |
|
220 | 220 | CDayLight=tm->tm_isdst; |
221 | 221 | CTimeZone= ((tm->tm_isdst>0) ? (TIMEZONE_GLOBAL-3600) :TIMEZONE_GLOBAL); |
222 | | -strcpy(CTZName,tzname[tm->tm_isdst]); |
| 222 | +StrNCpy(CTZName,tzname[tm->tm_isdst],MAXTZLEN+1); |
223 | 223 | #else/* neither HAVE_TM_ZONE nor |
224 | 224 | * HAVE_INT_TIMEZONE */ |
225 | 225 | CTimeZone=tb.timezone*60; |
|