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

r14115: Fix coverity bug #23. Don't deref a potentially null ptr.

Jeremy.
This commit is contained in:
Jeremy Allison
2006-03-09 22:46:42 +00:00
committed by Gerald (Jerry) Carter
parent 8dafa45b97
commit df32eb70a4

View File

@@ -5541,7 +5541,11 @@ void init_sam_user_info23W(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
copy_unistr2(&usr->uni_munged_dial, mung_dial);
init_uni_hdr(&usr->hdr_munged_dial, &usr->uni_munged_dial);
memcpy(&usr->logon_hrs, hrs, sizeof(usr->logon_hrs));
if (hrs) {
memcpy(&usr->logon_hrs, hrs, sizeof(usr->logon_hrs));
} else {
ZERO_STRUCT(usr->logon_hrs);
}
}
/*************************************************************************