pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2015-04-20
2015-04-20 08:24:23 by Martin Nilsson <nilsson@opera.com>
c13e64e245711727555cdf30bdb8a9aec8ed953c (
5
lines) (+
3
/-
2
)
[
Show
|
Annotate
]
Branch:
8.0
Fix dereference before null check. CID 1294655
517:
{ time_t t = _t; struct tm *res = localtime_zone( &t, &THIS->t );
+
if( !res )
+
RETURN 0;
/* These are supposedly correctly by localtime_zone. */ SET_GMTOFF(res, GET_GMTOFF(&(THIS->t))); SET_ZONE(res, GET_ZONE(&(THIS->t)));
-
if( !res )
-
RETURN 0;
+
THIS->t = *res; THIS->modified = 1; RETURN 1;