pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2017-04-19
2017-04-19 16:20:57 by Martin Nilsson <nilsson@fastmail.com>
aa3db146ff0ec3d054bf820f580d3f603b8a4ae4 (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
8.1
SEI CERT MSC33-C: Don't use asctime. Use asctime_s or strftime.
83:
#define strftime_zone strftime #define mktime_zone mktime #define strptime_zone strptime
-
#define asctime_zone asctime
+
#define localtime_zone(X,Y) localtime(X) #ifndef HAVE_EXTERNAL_TIMEZONE #undef timezone
413:
{ FIX_THIS(); {
-
char *tval
=
asctime_zone( &THIS->t )
;
-
if( tval )
-
push_text
(
tval
)
;
-
else
+
int
maxsize
=
26
;
+
char
s[maxsize];
+
if(
!strftime(s,
maxsize,
"%c",
&THIS->t)
)
push_undefined();
-
+
else
+
push_text(s);
} }