summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_parse/parse_samr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 79dbcfe034..043bafe285 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5633,7 +5633,11 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
data_blob_free(&blob);
- 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);
+ }
}
/*******************************************************************