1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-02 00:23:50 +03:00

r16230: Fix Klocwork #861 and others. localtime and asctime

can return NULL. Ensure we check all returns correctly.
Jeremy.
This commit is contained in:
Jeremy Allison
2006-06-14 21:36:49 +00:00
committed by Gerald (Jerry) Carter
parent 5ecfaf7d50
commit 6c61dc8ed6
16 changed files with 266 additions and 131 deletions

View File

@@ -2212,6 +2212,9 @@ static BOOL api_NetRemoteTOD(connection_struct *conn,uint16 vuid, char *param,ch
/* the client expects to get localtime, not GMT, in this bit
(I think, this needs testing) */
t = localtime(&unixdate);
if (!t) {
return False;
}
SIVAL(p,4,0); /* msecs ? */
SCVAL(p,8,t->tm_hour);