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:
committed by
Gerald (Jerry) Carter
parent
5ecfaf7d50
commit
6c61dc8ed6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user